Sitemap | Search || Zen Spider Website
/ Satori
/ The Satori Project
/ Interpreter Specifications
Interpreter Specifications
- Bytecode Interpreter
- Pushes
- From Reciever
- When the interpreter encounters this instruction, it adds to the data stack a reference to one of the receiver's instance variables. The instance variable is specified by a single bytecode following the instruction.
- From Temporary
- When the interpreter encounters this instruction, it adds to the data stack a reference to one of the active context's temporary variables. The temporary variables include the message arguments. The variable is specified by a single bytecode following the
- instruction.
- From Literal
- When the interpreter encounters this instruction, it adds to the data stack a reference to one of the method's literals. The variable is specified by a single bytecode following the instruction.
- From Association
- When the interpreter encounters this instruction, it adds to the data stack a reference to the "value" of an association stored in the literal frame. The association is specified by a single bytecode following the instruction.
- From Special Object
- When the interpreter encounters this instruction, it adds to the data stack a reference to one of the designated special objects. The object is specified by a single bytecode following the instruction accordingly: 0 - nil, 1 - true, 2 - false.
- Top of Stack
- When the interpreter encounters this instruction, it adds to the data stack a reference to the object currently on the top of the data stack. This duplicates the stack top.
- Active Context
- When the interpreter encounters this instruction, it adds to the data stack a reference to the currently active context.
- Pop (&Store)
- To Reciever
- When the interpreter encounters this instruction, it removes the top of the data stack and stores the object in one of the receiver's instance varialbles. The instance variable is specified by a single bytecode following the instruction
- To Temporary
- When the interpreter encounters this instruction, it removes the top of the data stack and stores the object in one of the active context's temporary variables. The variable is specified by a single bytecode following the instruction.
- To Association
- When the interpreter encounters this instruction, it removes the top of the data stack and stores the object as the "value" of an association in the literal frame. The association is specified by a single bytecode following the instruction.
- Top of Stack
- When the interpreter encounters this instruction, it removes the top of the data stack and discards it.
- Store
- To Reciever
- When the interpreter encounters this instruction, it stores the top of the data stack in one of the receiver's instance varialbles. The instance variable is specified by a single bytecode following the instruction
- To Temporary
- When the interpreter encounters this instruction, it stores the top of the data stack in one of the active context's temporary variables. The variable is specified by a single bytecode following the instruction.
- To Association
- When the interpreter encounters this instruction, it stores the top of the data stack as the "value" of an association in the literal frame. The association is specified by a single bytecode following the instruction.
- Jump
- Standard Jump
- When the interpreter encounters this instruction, it advances the active context's instruction pointer by the offset embedded in the two bytecodes following the instruction. The offset must be a signed value.
- If Stack Top is True
- When the interpreter encounters this instruction, it pops the object off the top of the data stack. If that object is true, it advances the active context's instruction pointer by the offset embedded in the two bytecodes following the instructioin. The of
- fset must be a signed value.
- If Stack Top is False
- When the interpreter encounters this instruction, it pops the object off the top of the data stack. If that object is false, it advances the active context's instruction pointer by the offset embedded in the two bytecodes following the instructioin. The o
- ffset must be a signed value.
- Send
- Standard Send
- When the interpreter encounters this instruction, it pops the number of arguments specified by the following bytecode off the data stack as well as a receiver. It looks up a method who's selector is stored in the literal frame and specified by the next by
- tecode. If the method is found in the receiver's class or one of it's superclasses, it then composes a new context, stores the current context and makes the new context active. If it is not found it re-attempts a send using "doesNotUnderstand:" as the sel
- ector and the original selector as the argument.
- To Super
- When the interpreter encounters this instruction, it behaves the same as when it sees a standard send; however, instead of beginning the method lookup with the receiver's class, it bypasses to the receiver's superclass.
- Static
- When the interpreter encounters this instruction, it behaves the same as when it sees a standard send; however, instead of looking up the method via the selector, it fetches the method from an association stored in the literal frame. The association is sp
- ecified instead of the selector.
- Return
- From Message
- When the interpreter encounters this instruction, it discards the currently active context and returns to the previous context.
- From Block
- When the interpreter encounters this instruction, it discards the currently active context, restores any modifications that where made to the previous context, and returns to the previous context.
Sitemap | Search || Zen Spider Website
/ Satori
/ The Satori Project
/ Interpreter Specifications