fixing assembly
This commit is contained in:
parent
07f86a8012
commit
2c99b067e5
|
@ -137,6 +137,8 @@ EOF
|
|||
[(CaptureEnvironment? op)
|
||||
empty]
|
||||
[(CaptureControl? op)
|
||||
empty]
|
||||
[(MakeBoxedEnvironmentValue? op)
|
||||
empty]))
|
||||
|
||||
(: collect-primitive-command (PrimitiveCommand -> (Listof Symbol)))
|
||||
|
@ -392,7 +394,10 @@ EOF
|
|||
(CaptureEnvironment-skip op))]
|
||||
[(CaptureControl? op)
|
||||
(format "MACHINE.control.slice(0, MACHINE.control.length - ~a)"
|
||||
(CaptureControl-skip op))]))
|
||||
(CaptureControl-skip op))]
|
||||
[(MakeBoxedEnvironmentValue? op)
|
||||
(format "[MACHINE.env[MACHINE.env.length - 1 - ~a]]"
|
||||
(MakeBoxedEnvironmentValue-depth op))]))
|
||||
|
||||
|
||||
(: assemble-op-statement (PrimitiveCommand -> String))
|
||||
|
|
|
@ -171,5 +171,22 @@ EOF
|
|||
|
||||
|
||||
|
||||
|
||||
(test '(begin (define counter 0)
|
||||
(set! counter (add1 counter))
|
||||
(displayln counter))
|
||||
"1\n")
|
||||
|
||||
(test '(begin (define x 16)
|
||||
(define (f x)
|
||||
(set! x (add1 x))
|
||||
x)
|
||||
(displayln (f 3))
|
||||
(displayln (f 4))
|
||||
(displayln x))
|
||||
"4\n5\n16\n")
|
||||
|
||||
|
||||
|
||||
#;(test (read (open-input-file "tests/conform/program0.sch"))
|
||||
(port->string (open-input-file "tests/conform/expected0.txt")))
|
Loading…
Reference in New Issue
Block a user