Package-level declarations

Types

Link copied to clipboard
class L1Decompiler(code: A_RawFunction, outerDeclarations: Array<A_Phrase>, tempGenerator: (String) -> String)

The L1Decompiler converts a compiled code object into an equivalent parse tree.

Link copied to clipboard

An instance of L1Disassembler converts a compiled code object into a textual representation of its sequence of level one operations and their operands.

Link copied to clipboard
class L1InstructionWriter(module: A_Module, startingLineNumber: Int, phrase: A_Phrase)

An instance of this class can be used to construct a compiled code object without detailed knowledge of the level one nybblecode instruction set.

Link copied to clipboard

An L1 instruction consists of an L1Operation and its operands, each implicitly described by the operation's L1OperandTypes. These operand types say how to interpret some integer that occurs as the encoding of an actual operand of an instruction.

Link copied to clipboard

A visitor for L1OperandTypes.

Link copied to clipboard

An L1Operation is encoded within a nybblecode stream as an opcode followed by operands. Opcodes less than 16 are encoded as a single nybble, and the others are represented as the extension nybble (15), followed by the opcode minus 16. This supports up to 31 distinct nybblecodes, the statically most frequently occurring of which should be assigned to the first 15 values (0-14) for compactness.

Link copied to clipboard

Provide a generic mechanism for visiting instructions. In particular, each L1Operation knows how to dispatch to a suitable one of my methods.