Jatha Software

org.jatha.machine
Class SECDMachine

java.lang.Object
  extended by org.jatha.machine.SECDMachine

public class SECDMachine
extends Object

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

Field Summary
 SECDop AP
           
 LispValue B
           
 SECDop BLK
           
 SECDRegister C
           
 SECDRegister D
           
 SECDop DAP
           
private static boolean DEBUG
           
 SECDop DUM
           
 SECDRegister E
           
(package private)  Jatha f_lisp
           
 SECDop JOIN
           
 SECDop LD
           
 SECDop LD_GLOBAL
           
 SECDop LDC
           
 SECDop LDF
           
 SECDop LDFC
           
 SECDop LDR
           
 SECDop LIS
           
 SECDop NIL
           
 SECDop RAP
           
 SECDop RTN
           
 SECDop RTN_IF
           
 SECDop RTN_IT
           
 SECDRegister S
           
 SECDop SEL
           
 SECDop SP_BIND
           
 SECDop SP_UNBIND
           
 SECDop STOP
           
 SECDop T
           
 SECDop TAG_B
           
 SECDop TAG_E
           
 SECDop TEST
           
 SECDRegister X
           
 
Constructor Summary
SECDMachine(Jatha lisp)
           
 
Method Summary
 LispValue Execute(LispValue code, LispValue globals)
           
 LispValue get_special_value(LispValue symbol)
           
 Jatha getLisp()
           
 void setStackValue(SECDRegister e, LispValue val)
           
 void special_bind(LispValue symbol, LispValue value)
           
 void special_set(LispValue symbol, LispValue value)
           
 void special_unbind(LispValue symbol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

f_lisp

Jatha f_lisp

DEBUG

private static boolean DEBUG

S

public SECDRegister S

E

public SECDRegister E

C

public SECDRegister C

D

public SECDRegister D

B

public LispValue B

X

public SECDRegister X

AP

public SECDop AP

BLK

public SECDop BLK

DAP

public SECDop DAP

DUM

public SECDop DUM

JOIN

public SECDop JOIN

LD

public SECDop LD

LD_GLOBAL

public SECDop LD_GLOBAL

LDC

public SECDop LDC

LDF

public SECDop LDF

LDFC

public SECDop LDFC

LDR

public SECDop LDR

LIS

public SECDop LIS

NIL

public SECDop NIL

RAP

public SECDop RAP

RTN

public SECDop RTN

RTN_IF

public SECDop RTN_IF

RTN_IT

public SECDop RTN_IT

SEL

public SECDop SEL

SP_BIND

public SECDop SP_BIND

SP_UNBIND

public SECDop SP_UNBIND

STOP

public SECDop STOP

T

public SECDop T

TAG_B

public SECDop TAG_B

TAG_E

public SECDop TAG_E

TEST

public SECDop TEST
Constructor Detail

SECDMachine

public SECDMachine(Jatha lisp)
Method Detail

getLisp

public Jatha getLisp()

special_bind

public void special_bind(LispValue symbol,
                         LispValue value)

special_unbind

public void special_unbind(LispValue symbol)

special_set

public void special_set(LispValue symbol,
                        LispValue value)

get_special_value

public LispValue get_special_value(LispValue symbol)

Execute

public LispValue Execute(LispValue code,
                         LispValue globals)
                  throws CompilerException
Throws:
CompilerException

setStackValue

public void setStackValue(SECDRegister e,
                          LispValue val)

Jatha Software