 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
ä |
Last
part of the compiler proper
|
|
|
ä |
Most
compilers generate the output of the code
|
|
|
generator
as the parse progresses instead of leaving
|
|
it
until after a parse tree is built
|
|
|
ä |
Small
parts of the parse tree fill in code templates
|
|
|
that
are generated by the code generator
|
|
|
|
ä |
An if,
then, else will have compare, branch, and
|
|
|
label
components in the corresponding code
|
|
|
ä |
Code
generator can generate
|
|
|
|
ä |
Executable
code
|
|
|
|
ä |
Advantage:
fast
|
|
|
|
ä |
Some
aspects of optimization can still take place by
|
|
|
|
observing
the final linear instruction stream
|
|
|
|
OR
|
|
|
|
ä |
Intermediate
language representation that is close to
|
|
|
assembler
but has additional information
|
|
|
|
ä |
Makes
it easier for optimizers to perform further
|
|
|
|
optimizations
to generate faster code
|
|