| www.delorie.com/gnu/docs/kawa/kawa-tour_10.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These are the stages of compilation:
ModuleBody).
Expression object, specifically a ModuleExp.
This stage handles macro expansion and lexical name binding.
Many (future) optimizations can be done in this phase by annotating
and re-arranging Expression trees.
ModuleExp is compiled into
one or more byte-coded classes.
This is done by invoking the virtual compile
method recursively on the Expressions, which generates
instructions (using the codegen package) to evaluate the
expression and leave the result on the Java operand stack.
At the end we ask the codegen package to write out the resulting
classes and methods. They can be written to a file (for
future use), or into byte arrays in memory.
ClassLoader feature.
(That is how the read-eval-print loop works.)
An instance of the compiled sub-class of ModuleBody
is created and run, which normally produces various side-effects.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |