Questions tagged [compiler]
A compiler is a computer program that transforms source code written in one programming language into another computer language.
16
questions with no upvoted or accepted answers
6
votes
0answers
134 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
1answer
852 views
Writing a Compiler - .reloc section of the COFF
I'm looking for a little bit of direction in writing a compiler. I've written in Common Intermediate Language, C#, and various other .NET languages; I've written my own Metadata Parser and now I'm ...
4
votes
1answer
357 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
0answers
91 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
0answers
78 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-...
2
votes
0answers
72 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
0answers
146 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
0answers
114 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
0answers
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
0answers
72 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
1answer
102 views
How to design a system that can operate and replay its functions call stack?
I am writing a processor for the Citation Style Language (CSL) in JavaScript.
Before I explain what my problem is, I must give some context first:
CSL is an XML specification for describing how to ...
0
votes
0answers
69 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
0answers
85 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
0answers
2k 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
0answers
587 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
1answer
226 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 ...