introduction to code generation

PPTX 8 sahifa 205,1 KB Bepul yuklash

Sahifa ko'rinishi (5 sahifa)

Pastga aylantiring 👇
1 / 8
introduction to code generation introduction to code generation what is code generation? the first part of a compiler analyzes the source code into a structure that carries the meaning of the program; this structure is generally the abstract syntax tree that’s been checked and decorated. (remember decorated means all identifier references have been resolved.) from this structure we can generate the corresponding code in some other language, the target language. this is what a code generator does. what is code generation? some compilers generate twice: they first generate code in some “intermediate language” like sil, llvm ir, hir, mir, cil, etc. then they do the “real” code generation into a target language that is directly runnable (or really close to it), like virtual machine code, assembly language, or machine language. goals of code generation here are the three goals of any good code generator: correctness it should produce correct code …
2 / 8
ta from the database, or is it better to have some program automatically create these for you? disadvantages the big disadvantage is that it forces you into writing the code that is compatible with the generated code. most of the time this isn't a problem, but it can be a real hassle when someone comes up to you and says "hey, can we do x?" and that conflicts with the generated code. if the generator is good, it will allow you to change functionality, but that almost always increases the complexity of the code generated etc. this complexity has a price. it's more difficult to understand, and it can be less efficient that code you write yourself. this of course varies by situation. image1.png image2.png image3.png source code front end (analyzer) checked/decorated ast with references resolved (a.k.a. semantic graph) target code source code front semantic end graph > int. repr. …
3 / 8
introduction to code generation - Page 3
4 / 8
introduction to code generation - Page 4
5 / 8
introduction to code generation - Page 5

Ko'proq o'qimoqchimisiz?

Barcha 8 sahifani Telegram orqali bepul yuklab oling.

To'liq faylni yuklab olish

"introduction to code generation" haqida

introduction to code generation introduction to code generation what is code generation? the first part of a compiler analyzes the source code into a structure that carries the meaning of the program; this structure is generally the abstract syntax tree that’s been checked and decorated. (remember decorated means all identifier references have been resolved.) from this structure we can generate the corresponding code in some other language, the target language. this is what a code generator does. what is code generation? some compilers generate twice: they first generate code in some “intermediate language” like sil, llvm ir, hir, mir, cil, etc. then they do the “real” code generation into a target language that is directly runnable (or really close to …

Bu fayl PPTX formatida 8 sahifadan iborat (205,1 KB). "introduction to code generation"ni yuklab olish uchun chap tomondagi Telegram tugmasini bosing.

Teglar: introduction to code generation PPTX 8 sahifa Bepul yuklash Telegram