Questions tagged [compiler]

A compiler is a computer program that transforms source code written in one programming language into another computer language.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
196 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 ...
user avatar
  • 225
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 ...
user avatar
  • 149
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 ...
user avatar
2 votes
0 answers
92 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-...
user avatar
  • 121
2 votes
0 answers
242 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 ...
user avatar
  • 129
1 vote
0 answers
66 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-...
user avatar
1 vote
0 answers
63 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 ...
user avatar
  • 197
1 vote
0 answers
169 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....
user avatar
1 vote
0 answers
117 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 ...
user avatar
  • 169
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)={ $ ,) }...
user avatar
  • 237
1 vote
0 answers
73 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 ...
user avatar
  • 151
0 votes
0 answers
94 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 ...
user avatar
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.
user avatar
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 ...
user avatar
  • 367
0 votes
0 answers
597 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, ...
user avatar
  • 552
-1 votes
1 answer
267 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 ...
user avatar
  • 109
-3 votes
1 answer
243 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?
user avatar
  • 95