org.jatha.machine |
|
Java Source File Name | Type | Comment |
opAP.java | Class | opAP applies a non-recursive function in an evaluation environment.
((f.e') v.s) e (AP.c) d --> NIL (v.e') f (s e c.d)
Replaces the C register with the CAR of the topmost value on the S register.
Pushes the C, E and S registers onto the D register, in that order.
Replaces the E register with a cons of the second value on the S
register and the cdr of the first value.
Places NIL in the S register.
See Also: SECDMachine author: Micheal S. |
opBLK.java | Class | The BLK-operation is a marker, which pops itself and it's argument from the C register. |
opDAP.java | Class | opDAP optimizes the (... |
opDUM.java | Class | opDUM Sets up a dummy entry in the E register to prepare
for execution of a recursive function.
Pushes NIL onto the E register and pops the C register.
See Also: SECDMachine author: Micheal S. |
opJOIN.java | Class | opJOIN terminates a branch of an IF-ELSE statement
by taking the topmost entry from the D register and
storing it in the C register.
See Also: SECDMachine author: Micheal S. |
opLD.java | Class | opLD pushes the value of a local variable onto
the S register and removes two values from the C register.
The values on the C register are the constant 'LD'
and the pair (i, j), which are indices into the
value of the E register which is a list of lists.
See Also: SECDMachine author: Micheal S. |
opLDC.java | Class | opLDC pops two values from the C register and
pushes the second of those onto the S register.
The two values on the C register should be
the constant 'LDC' and a value.
See Also: SECDMachine author: Micheal S. |
opLDF.java | Class | opLDF prepares to execute a non-recursive function.
It makes a closure and pushes it on the S register.
Uses S register (2 values).
Modifes C, D, E, and S registers.
See Also: SECDMachine author: Micheal S. |
opLDFC.java | Class | LDFC is not in Kogge's book. |
opLDR.java | Class | JPG : Not an original jatha opcode
opLDR (op LoaD Rest) has been added to handle user-defined functions with
a variable number of args (with &rest keyword in the list of parameters)
opLDR pushes the value of a local variable onto
the S register and removes two values from the C register. |
opLD_GLOBAL.java | Class | opLD_GLOBAL pushes onto the stack the value of a global variable.
Handles special (dynamically-bound) variables correctly.
Uses C register (2 values).
Modifes register S
See Also: SECDMachine author: Micheal S. |
opLIS.java | Class | opLIS is not in the Kogge book. |
opNIL.java | Class | opNIL pushes the constant NIL onto the S register and pops the C register.
Modifes S register.
See Also: SECDMachine author: Micheal S. |
opRAP.java | Class | opRAP applies a recursive function in an evaluation environment.
It pushes the S, E and C registers on to the D register.
It pushes the car of the topmost S value onto the C register.
((f.(nil.e)) v.s) (nil.e) (RAP.c) d -->
NIL ((v.e).e) f (s e c.d)
Uses S, E, C and D registers.
Modifes S, E, C and D registers.
See Also: SECDMachine author: Micheal S. |
opRTN.java | Class | opRTN returns from a function call.
Replaces the S, E and C registers with the first three
values in the D register.
Then pushs the topmost value on the old S register on the new S register.
See Also: SECDMachine author: Micheal S. |
opRTN_IF.java | Class | opRTN_IF returns from a function call if the
value on the stack is NIL. |
opRTN_IT.java | Class | opRTN_IT returns from a function call if the
value on the stack is non-NIL. |
opSEL.java | Class | opSEL takes a branch in an IF-ELSE expression.
It selects code from the C register and, depending on
whether the topmost value in the S register is true
or not, places that code on the C register and pushes
the remaining C register code onto the D register.
Pops the S register.
See Also: SECDMachine author: Micheal S. |
opSP_BIND.java | Class | opSP_BIND binds a special variable to the topmost
value on the stack. |
opSP_UNBIND.java | Class | opSP_UNBIND unbinds a special variable.
The variable name is the next value on the C register.
See Also: SECDMachine author: Micheal S. |
opSTOP.java | Class | opSTOP halts the machine.
Uses C register.
See Also: SECDMachine author: Micheal S. |
opT.java | Class | opT pushes a constant T onto the stack.
Uses C register (2 values).
Modifes S register.
See Also: SECDMachine author: Micheal S. |
opTAG_B.java | Class | |
opTAG_E.java | Class | |
opTEST.java | Class | opTEST is a variation of SEL that optimizes for recursion
in the else part. |
SECDMachine.java | Class | The SECDMachine contains the registers and
basic functionality of the SECD machine.
It exports constants corresponding to each
primitive machine instruction and to each
primitive LISP operation, so that the compiler
may insert them into code.
A modification to the standard SECD machine is
the new 'B' register that handles dynamic
binding.
See Also: SECDop author: Micheal S. |
SECDop.java | Class | SECDop is the abstract class that encompasses all SECD
machine ops.
See Also: org.jatha.compile.LispPrimitive author: Micheal S. |
SECDRegister.java | Class | SECDRegister is essentially a Stack, with
an additional assign() method
which resets the value, and a value()
method which retrieves the whole stack.
author: Micheal S. |