Skip to main content

Questions tagged [compilers]

Compilers are implementations of programming languages which convert source code into another format, such as a binary executable, bytecode, or another programming language. Use this tag for questions about the design or implementation of compilers. This contrasts with interpreters, which execute source code directly.

Filter by
Sorted by
Tagged with
1 vote
2 answers
357 views

want to design a simple programming language for educational purposes. My goal is to understand the fundamentals of how a language works — defining syntax, grammar, and how code gets executed (...
Anna Cláudia Speck de Souza's user avatar
3 votes
1 answer
562 views

So, obviously, the C compiler, when compiling gotos, before inserting the jump instruction, needs to insert ...
FlatAssembler's user avatar
2 votes
1 answer
187 views

I'm making an "assembly language" called X that compiles from X to an esoteric language Y, but I encountered some problems with the data types for the variables. I currently have three data ...
Fmbalbuena's user avatar
19 votes
5 answers
4k views

I've seen the terms "frontend" and "backend" thrown around for compilers, but never got their precise meaning. I get that frontend encompasses parsing, and backend includes code ...
Seggan's user avatar
  • 3,442
6 votes
0 answers
169 views

I've been implementing a B compiler for x86 assembly for a while now and have been asking one or two questions in Retrocomputing. My tools for implementing it is using flex/bison with C. Recently I've ...
아이스크림은메로나's user avatar
0 votes
1 answer
555 views

Out of curiosity I checked how Google AI would respond to a similar question. The bot seemed clever enough to understand the question, but responded that functions in this case would have no return ...
Osr Workshops's user avatar
83 votes
2 answers
32k views

C has the register keyword, originally designed as a hint to the compiler that a variable should be placed in a register rather than on the stack. However this is ...
CPlus's user avatar
  • 10.5k
2 votes
2 answers
387 views

GNU Assembler, when targetting x86, has directives .att_syntax and .intel_syntax for switching between Intel Syntax and AT&T ...
FlatAssembler's user avatar
0 votes
1 answer
456 views

So, here is how strings work in my AEC-to-WebAssembly compiler. After the program is parsed, all strings except inline assembly ones are gathered in a C++ ...
FlatAssembler's user avatar
6 votes
3 answers
645 views

What design restrictions inform a language having / having a useful whole-program optimizing compiler? I'm aware that Standard ML has a whole-program optimizing compiler implementation in MLton. I ...
apropos's user avatar
  • 1,295
2 votes
1 answer
358 views

In Universities, students spend a lot of time correcting syntax errors. For purposes of a thought experiment, suppose that a new language was developed that supported multiple syntaxi. For a simple ...
Samuel Muldoon's user avatar
16 votes
7 answers
6k views

I recently saw this tweet. And for posterity, this is the C++ code: ...
JBraha's user avatar
  • 263
3 votes
3 answers
694 views

I have some experience in writing stack based VM's and am now thinking about implementing an interpreter based on registers. I have not yet started anything and the project is still in planning phase. ...
Timsib Adnap's user avatar
50 votes
5 answers
18k views

This answer is an example of a compiler recognizing that a complex expression is equivalent to a single operation: ...
CPlus's user avatar
  • 10.5k
5 votes
0 answers
172 views

According to Engineering a Compiler Cooper, K. and Torczon, L. the SSA transformation algorithm is divided into two parts Inserting $\phi$ functions. For each existing definition of a variable ...
David Yue's user avatar
  • 151

15 30 50 per page
1
2 3 4 5 6