27 lines
1002 B
Plaintext
27 lines
1002 B
Plaintext
# Intermediate code generation
|
|
|
|
- To access named parameters inside a procedure, IR should be able to reference
|
|
them. During the generation the needed information (e.g. offsets or registers)
|
|
can be extracted from the symbol table and saved in the operands.
|
|
- Glue always generates the same intermediate variable (LocalVariable 0) for
|
|
local variables. (LocalVariable 0) is handled the same as temporary variables
|
|
that are currently saved only in registers. There space on the stack allocated
|
|
for local variables.
|
|
|
|
# ELF generation
|
|
|
|
- Don't ignore relocations where the symbol is not defined in the symbol table.
|
|
Report an error about an undefined symbol.
|
|
|
|
# Register allocation
|
|
|
|
- Each temporary variable gets a tn register where n is the variable index. If
|
|
there more variables the allocation will fail with out of bounds runtime
|
|
error. Implement spill over.
|
|
- The allocator puts temporary and local variables into the same registers,
|
|
causing conflicts.
|
|
|
|
# Language
|
|
|
|
- Array support.
|