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

View File

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

View File

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

View File

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