Implement 5.30; on to last section; let's go!
This commit is contained in:
@@ -36,8 +36,12 @@ unknown-procedure-type
|
||||
(assign val (const unknown-procedure-type-error))
|
||||
(goto (label signal-error))
|
||||
|
||||
unbound-variable-error
|
||||
(assign val (const unbound-variable-error))
|
||||
error-unbound-variable
|
||||
(assign val (const error-unbound-variable))
|
||||
(goto (label signal-error))
|
||||
|
||||
apply-primitive-error
|
||||
(assign val (op apply-primitive-result) (reg val))
|
||||
(goto (label signal-error))
|
||||
|
||||
signal-error
|
||||
@@ -74,10 +78,9 @@ ev-self-eval
|
||||
(assign val (reg exp))
|
||||
(goto (reg continue))
|
||||
ev-variable
|
||||
;(perform (op user-print) (reg exp))
|
||||
(assign val (op lookup-variable-value) (reg exp) (reg env))
|
||||
(test (op unbound-variable?) (reg val))
|
||||
(branch (label unbound-variable-error))
|
||||
(branch (label error-unbound-variable))
|
||||
(goto (reg continue))
|
||||
ev-quoted
|
||||
(assign val (op text-of-quotation) (reg exp))
|
||||
@@ -137,9 +140,14 @@ apply-dispatch
|
||||
(goto (label unknown-procedure-type))
|
||||
|
||||
primitive-apply
|
||||
(assign val (op apply-primitive-procedure)
|
||||
(assign val (op apply-primitive-procedure-safe)
|
||||
(reg proc)
|
||||
(reg argl))
|
||||
;(perform (op user-print) (reg val))
|
||||
;(perform (op newline))
|
||||
(test (op apply-primitive-error?) (reg val))
|
||||
(branch (label apply-primitive-error))
|
||||
(assign val (op apply-primitive-result) (reg val))
|
||||
(restore continue)
|
||||
(goto (reg continue))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user