Skip to main content

Questions tagged [code-generation]

For questions related to the generation of code, especially lower level or intermediary code.

5 votes
1 answer
394 views

Assume that I have a simple language with the types I32 and F32, but also composite types like Tuples. I want to add Discriminated Union types, but I find it difficult to generate the wasm code in a ...
Jonas's user avatar
  • 715
5 votes
1 answer
728 views

I am familiar with traditional linking concepts (static and dynamic linking, relocation, PIE) and with traditional compiler optimizations (such as static expression evaluation, loop unrolling and ...
Borisav Živanović's user avatar
3 votes
1 answer
517 views

A compiler I'm writing generates the following x86-64 assembly (AT&T syntax) for a recursive factorial function. I convert the assembly into an ELF executable using ...
Veera Sivarajan's user avatar
5 votes
1 answer
270 views

Having done my type checker, I'm thinking on targetting C++. How can I efficiently add debugging information to thrown exceptions? Similiar to JavaScript, you can throw anything. ...
Hydroper's user avatar
  • 1,047
9 votes
4 answers
598 views

Consider a compiler whose target language is some virtual machine bytecode. The jump instructions have to encode the size of their jumps. For example, in JVM bytecode the ...
hugomg's user avatar
  • 1,415