Questions tagged [compiler]
A compiler is a computer program that transforms source code written in one programming language into another computer language.
18
questions with no upvoted or accepted answers
6
votes
0
answers
241
views
Why does GHC represent recursion in Haskell with recursive binders instead of a fixpoint operator?
GHC's Core data type represents recursion with recursive binders in the Let constructor; as I understand it, all let expressions in Haskell are effectively let rec expressions. Why does GHC use this ...
4
votes
1
answer
365
views
I want to write a data processing & analysis programming language that compiles to SAS. How to go about choosing a language to write my compiler in?
As a side project I wrote a simple macro in SAS to add syntatic sugar to SAS code. I hate how verbose SAS is sometimes!
So my macro looks like this
%macro md(code);
/* expects a superquoted ...
3
votes
0
answers
102
views
Windows: Have a dedicated MS Visual C/C++ toolchain
For a CI system and the developers in our team, I'd like to be able to use a specific version of a MSVC toolchain for native Windows builds.
The goal is to have a well-defined consistent build-...
3
votes
0
answers
100
views
Loop Unfolding and Named Significant Bits
I've been writing a Parser Compiler for the last seven or so years, and I recently got to the point (yet again, never satisfied) of structuring the portion dealing with the portions of the language ...
2
votes
0
answers
300
views
Is it dangerous to link together -mno-red-zone and regular code?
I know that in x86_64, there exists a 128 byte red zone above (or below, address-wise) the stack pointer that functions can use without subtracting from rsp.
This sounds to me like the only things ...
1
vote
0
answers
188
views
How to practically implement a symbol table during compiler design?
I was trying compiler design with flex and bison. This is my first attempt in that sense.
For my compiler, I wanted to build a symbol table which would help in building a proper compile-time type-...
1
vote
0
answers
79
views
Is there a easy and useful error handling algorithm for bottom-up based parser?
My English skill is poor because I'm not a native English speaker.
Please understand.
I wonder that there is a error handling algorithm easy and useful in LR parser.
LR Parser is bottom up based so it ...
1
vote
0
answers
170
views
How to get verification that you've implemented all your API in a static library?
I just learned that static library building skips the linking stage, which explains why my build process succeeds all the time when it's possible I actually haven't implemented a function in my header....
1
vote
0
answers
131
views
Advantages of tiling based instruction selection algorithms with tiles representing more than one machine instruction?
In Modern Compiler Implementation in C of A. Appel some instruction selection algorithms are discussed based on tiling an intermediate representation tree. Each tile (or tree pattern) expresses a ...
1
vote
0
answers
3k
views
First and Follow Algorithm in Compiler Design
While I was studying Compilers,I saw an example in first and follow that illustrated how to 'find the first and follow' non-terminals in a grammer.
But I couldn't get how FOLLOW(E')=FOLLOW(E)={ $ ,) }...
1
vote
0
answers
75
views
Built-in Context-and-Input-to-Output-Hashing in Compilers
Why doesn't (open source) compilers contain builtin funtionality for (shared) caching and reuse-fetching (using SHA1-hash of compiler-version, build-flags, target-platform and inputs) of executable ...
0
votes
0
answers
63
views
How can I represent a transformed AST between compilation stages?
I'm writing a compiler in Rust. I've reached the point where I have an AST and am ready to do symbol resolution, type-checking, etc. But, I'm unsure of how to represent an AST as containing "...
0
votes
0
answers
102
views
Results of testing different compiler optimizations of GNU GCC are confusing
I tested out a few different compiler optimizations on GNU GCC, in the CodeBlocks IDE. With each different optimization I ran the same test: I let my program try to build as big of a tree as it could ...
0
votes
0
answers
91
views
Why are datatypes different in terms of bit size based on complier, and OS used
I was reading a tutorial on C++ as I am new to programming, and I was wondering why the sizeof operator gives different output depending on what you're programming with.
0
votes
0
answers
3k
views
Java platform vs Source/Binary format settings in Netbeans
I've just wanted to get to know what these particular settings really do:
Project Properties -> Libraries -> Java Platform
Project Properties -> Sources -> Source/Binary Format
After a little bit of ...
0
votes
0
answers
598
views
Android runtime - does ART miss optimization opportunities over Dalvik?
Is ART a strict improvement over Dalvik, or there are optimizations that an ahead-of-time compiler will miss compared to JIT, but Google decide they don't matter in practice?
For example, with JIT, ...
-1
votes
1
answer
281
views
Do C# compilers optimize away the facade pattern?
In C#, if I hide away implementation behind a facade, or the "pimpl" pattern, does the compiler optimize away the intermediate function call if all it's doing is calling an equivalent method from ...
-3
votes
1
answer
330
views
What programming languages besides Apple Swift & Objective-C use the Llvm compile-time Automatic Reference Counting exclusively for memory management?
Are there other general purpose programming languages besides Objective-C +ARC and Swift which target the llvm and use static compile time Automatic Reference Counting for memory management?