Package avail. compiler. instruction
Types
This is a multi-method call instruction. The opcode is followed by the index of the message (a method), then the index of the literal that holds the return type for this call site.
This instruction build a function from compiled code and some pushed variables.
AvailDuplicate models the L1Ext_doDuplicate nybblecode.
Push the value of a variable found in a literal.
Push the value of a local variable.
Push the value of an outer (lexically captured) variable.
Push the value of a variable of some sort.
AvailInstruction implements an abstract instruction set that doesn't have to agree precisely with the actual implemented Level One nybblecode instruction set. The mapping is approximately one-to-one, however, other than providing the ability to defer certain analyses, such as last-use of variables, until after selection of AvailInstructions. This allows the analysis to simply mark the already abstractly-emitted instructions with information that affects the precise nybblecodes that will ultimately be emitted.
This abstract subclass of AvailInstruction introduces a generic index whose interpretation is left to subclasses.
An AvailLabel is a pseudo-instruction in the Level One instruction set. It represents a label in the parse tree of a block. If a label declaration occurs at all in a block, it must be the first statement of the block.
Construct a tuple from some number of objects already pushed on the stack.
Permute the top N stack items via a permutation found in a literal tuple.
The AvailPop instruction represents the removal of one element from a continuation's stack of values.
I represent the use of a label. When a label is used, it causes the current continuation to be copied. The copy is then reset to the state that existed when the current function started running, resetting the program counter, stack pointer, and stack slots, and creating new local variables.
AvailPushLiteral is an instruction that represents pushing a particular object (known at code generation time, undoubtedly earlier) onto a continuation's stack.
Push either a local variable (the variable itself), a local constant, or an argument.
Push an outer (lexically captured) variable. Not its value, but the variable itself.
Push a variable of some sort.
Assign to a variable that's captured as a literal in the code.
Set a local constant to its computed value, popped from the stack.
Set a local variable.
Set the value of a variable found in the function's list of captured outer variables.
An AvailVariableAccessNote is a helper class used during data flow analysis. As it progresses forward through a block's AvailInstructions, it tracks, for a particular variable, the most recent instruction which pushes that variable itself on the stack. It also tracks the most recent instruction which pushes that variable's value on the stack.