2024-08-17 14:16:16 +02:00
|
|
|
# Intermediate code generation
|
|
|
|
|
2024-11-06 22:23:49 +01:00
|
|
|
- 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.
|
2024-09-08 22:53:07 +02:00
|
|
|
|
|
|
|
# ELF generation
|
|
|
|
|
|
|
|
- Don't ignore relocations where the symbol is not defined in the symbol table.
|
|
|
|
Report an error about an undefined symbol.
|
2024-10-08 17:29:08 +02:00
|
|
|
|
2024-09-29 19:50:55 +02:00
|
|
|
# Register allocation
|
|
|
|
|
2024-10-31 22:19:48 +01:00
|
|
|
- Each temporary variable gets a tn register where n is the variable index. If
|
2024-10-06 18:07:57 +02:00
|
|
|
there more variables the allocation will fail with out of bounds runtime
|
|
|
|
error. Implement spill over.
|
2024-11-06 22:23:49 +01:00
|
|
|
- The allocator puts temporary and local variables into the same registers,
|
|
|
|
causing conflicts.
|
|
|
|
|
|
|
|
# Language
|
|
|
|
|
|
|
|
- Array support.
|