Translate a catch block into RISC machine code.
Translate a catch block into RISC machine code. Each one simply translates to a test of the value of the current exception followed by code which executed if that test succeeds.
The RISC machine program that is the translation of the given Obr language program, comprising the translation of the program's declarations and statements.
The RISC machine program that is the translation of the given Obr language program, comprising the translation of the program's declarations and statements. The bodies need to be computed first so that the memory size is fully computed before we generate the RISC node.
The RISC machine datum that is the translation of the given Obr language expression.
The RISC tree items that are the translation of the given Obr language declaration.
The current label to which an EXIT statement should jump when used at the given context.
The label marking the entry point to the currently active error handler (CATCH block).
The label marking the entry point to the currently active error handler (CATCH block). Defaults to a global handler outside of all TRY...CATCH blocks
Notice that since this version of Obr has no procedures, the currently active exception handler can be determined completely statically.
The exception label for the context outside the current Try statement.
The exception label for the context outside the current Try statement. Only valid when used inside a Try statement.
A location reserved for storing the exception value associated with a raised exception.
Generate a brand new target label.
Generate a brand new target label. Shares counter with the encoding phase so that labels are unique.
Return the address for the location of the entity represented by a given node.
Get the location of an entity.
Get the location of an entity. Only valid for variables, but defined on all entities.
The RISC tree items that are the translation of the given Obr language statement.
A location reserved for storing temporary integer values while they are checked for possible division by zero or index out of bounds errors.
Module implementing transformation from Obr to RISC tree code.