fixed up test cases to use the new linkage structures.

This commit is contained in:
Danny Yoo 2011-03-28 17:51:02 -04:00
parent 74fd786921
commit d0eb3b610e
4 changed files with 9 additions and 7 deletions

View File

@ -50,7 +50,7 @@
'(?)
1
'val
'return)
return-linkage)
;; The code for the continuation coe follows. It's supposed to
;; abandon the current continuation, initialize the control and environment, and then jump.
@ -67,7 +67,7 @@
(define (make-bootstrapped-primitive-code name src)
(parameterize ([current-defined-name name])
(append
(compile (parse src) (make-PrimitivesReference name) 'next)
(compile (parse src) (make-PrimitivesReference name) next-linkage)
;; Remove the prefix after the Primitives assignment.
`(,(make-PopEnvironment 1 0)))))

View File

@ -19,7 +19,7 @@
(assemble/write-invoke (append (get-bootstrapping-code)
(compile (parse source-code)
'val
'next))
next-linkage))
op)
(fprintf op ";\n"))

View File

@ -4,11 +4,12 @@
"simulator-structs.rkt"
"simulator-helpers.rkt"
"compile.rkt"
"parse.rkt")
"parse.rkt"
"il-structs.rkt")
(define (run-compiler code)
(compile (parse code) 'val 'next))
(compile (parse code) 'val next-linkage))
;; Test out the compiler, using the simulator.

View File

@ -3,11 +3,12 @@
(require "simulator.rkt"
"simulator-structs.rkt"
"compile.rkt"
"parse.rkt")
"parse.rkt"
"il-structs.rkt")
(define (run-compiler code)
(compile (parse code) 'val 'next))
(compile (parse code) 'val next-linkage))
;; run: machine -> (machine number)
;; Run the machine to completion.