compiler

Passing a list of files to javac

How can I get the javac task to use an existing fileset? In my build.xml I have created several filesets to be used in multiple places throughout build file. Here is how they have been defined: <fileset dir = "${src}" id = "java.source.all"> <include name = "**/*.java" /> </fileset> <fileset dir = "${src}" id ...

Compiling the compiler - how many times?

If you compile a new version of compiler, how many times should you recompile it iteratively? First: compile the new version of compiler[1] using the old version[0]. Second: compile the new version[2] using the newly compiled one[1], to apply new optimizations and fix bugs to the binary, not present in old[0] compiler. Now third? Comp...

compile OpenBUGS 64-bit

I need to compile OpenBUGS on a 64-bit machine but its repository (http://sourceforge.net/projects/openbugs/develop) consists of a bunch of .ocf files. Where can I find a compiler that works on Linux to do the job? ...

What are the differences between a Just-in-Time-Compiler and an Interpreter?

What are the differences between a Just-in-Time-Compiler and an Interpreter, and are there differences between the .NET and the JAVA JIT compiler? ...

How much faster are register based architectures than stack architectures?

Studying compilers course, I am left wondering why use registers at all. It is often the case that the caller or callee must save the register value and then restore it. In a way they always end up using the stack anyway. Is creating additional complexity by using registers really worth it? Excuse my ignorance. Update: Please, I know ...

Compile time comparison between Windows GCC and MSVC compiler

We are working on reducing compile times on Windows and are therefore considering all options. I've tried to look on Google for a comparison between compile time using GCC (MinGW or Cygwin) and MSVC compiler (CL) without any luck. Of course, making a comparison would not be to hard, but I'd rather avoid reinventing the wheel if I can. D...

Java generics: What is the compiler's issue here? ("no unique maximal instance")

I have the following methods: public <T> T fromJson( Reader jsonData, Class<T> clazz ) { return fromJson( jsonData, (Type)clazz ); } public <T> T fromJson( Reader jsonData, Type clazz ) { ... } The compiler is saying about the first method: type parameters of <T>T cannot be determined; no unique maximal instance exists for...

Can you make VB.NET compilation as strict as C#?

In VB.NET, it is entirely possible to pass an integer as a string parameter to a method without calling .ToString() - it's even possible to call .ToString without the ()'s. The code will run without a problem, VB will interpret the integer as a string without having been told to. In C#, these would cause compilation errors - you are req...

Can code formatting lead to change in object file content?

I have run though a code formatting tool to my c++ files. It is supposed to make only formatting changes. Now when I built my code, I see that size of object file for some source files have changed. Since my files are very big and tool has changed almost every line, I dont know whether it has done something disastrous. Now i am worried ...

How to compile many java class?

i got some source code here. the thing is that they are separated to one another. How can i compile them all? cause im use to compile single class only ...

Visual Studio compile "filter" as C and "filters" groups as C++

Hello, I have written the majority of my project in C++. However there are several "filters" or folders which need to be compiled as C and linked to the project. How can I configure this within VStudio? Thanks. ...

Compiling a C program with a specific architecture

I was recently fighting some problems trying to compile an open source library on my Mac that depended on another library and got some errors about incompatible library architectures. Can somebody explain the concept behind compiling a C program for a specific architecture? I have seen the -arch compiler flag before and have seen values ...

LALR(1) or GLR on Windows - Alternatives to Bison++ / Flex++ that are current?

I have been using the same version of bison++ (1.21-8) and flex++ (2.3.8-7) since 2002. I'm not looking for an alternative to LALR(1) or GLR at this time, just looking for the most current options. Is anyone aware of any later ports of these than the original that aren't Cygwin dependent? What are other folks using in Windows environme...

Is LLVM suitable for parallel languages?

What properties of LLVM makes it good choice for implementation of (parallel, concurrent, distributed)-oriented language, what makes it bad? ...

Question about Objective C calling convention and argument passing on ARM

I want to know how objective C runtime handle arguments when I call a objective C method like [NSString stringWithFomat:@"%@, %@", @"Hello", @"World"] There are three arguments for this objective C call, how does it work compared to typical way on a ARM system. I have known register r0, r1, r2, r3 will hold first 4 arguments, how abou...

Automatically find compiler options for fastest exe on given machine?

Is there a method to automatically find the best compiler options (on a given machine), which result in the fastest possible executable? Naturally, I use g++ -O3, but there are additional flags that may make the code run faster, e.g. -ffast-math and others, some of which are hardware-dependent. Does anyone know some code I can put in...

Benefits of 'Optimize code' option in Visual Studio build

Much of our C# release code is built with the 'Optimize code' option turned off. I believe this is to allow code built in Release mode to be debugged more easily. Given that we are creating fairly simple desktop software which connects to backend Web Services, (ie. not a particularly processor-intensive application) then what if any sor...

Routing algorithm

Hello, I'm giving a presentation about computer routing and I want to make a good analogy with a real-world situation. However, I could not find it. Do you have in mind any of the situations like the computer routing. If yes, could you please provide me with it ...

Does the compiler optimize the function parameters passed by value?

Lets say I have a function where the parameter is passed by value instead of const-reference. Further, lets assume that only the value is used inside the function i.e. the function doesn't try to modify it. In that case will the compiler will be able to figure out that it can pass the value by const-reference (for performance reasons) an...

Why doesn't the compiler at least warn on this == null

Why does the C# compiler not even complain with a warning on this code? : if (this == null) { // ... } Obviously the condition will never be satisfied.. ...