Sun May 11 14:46:50 CEST 2008
target expression language (TEL)
1. what is it?
The target expression language is the vehicle for expressions that
depend on target labels (static memory addresses), and are passed to
the assembler to be evaluated after static target memory allocation.
In the integrated compiler + assembler architecture in Brood, these
expressions are computations closed over (initially unresolved) target
word structures. For external assemblers, they need to be translated
into strings that represent target assembler expressions. Because of
the need to represent external tools, this language benifits from an
intermediate form. (currently, and only for illustration, this is
symbolic SCAT code, but will probably be replaced by s-expression code
2. where do these expressions come from?
The expressions are generated by the peephole optimizing code
generator, mostly as partially evaluated target code. I.e. the Purrr
' main 1 +
compiles that code as the expression which adds 1 to the address of
the "main" procedure word. At compile time it can be determined that
the value can be obtained at assembly/link time, so literal
instructions can be generated. However, at compile time only the
computation can be stored, due to possible dependency on (as of yet
undefined) target label values.