From d0eb3b610eed2add7f6966c503c4fbbf699efc81 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Mon, 28 Mar 2011 17:51:02 -0400 Subject: [PATCH] fixed up test cases to use the new linkage structures. --- bootstrapped-primitives.rkt | 4 ++-- package.rkt | 2 +- test-compiler.rkt | 5 +++-- test-conform.rkt | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bootstrapped-primitives.rkt b/bootstrapped-primitives.rkt index e897fac..c13a3a1 100644 --- a/bootstrapped-primitives.rkt +++ b/bootstrapped-primitives.rkt @@ -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))))) diff --git a/package.rkt b/package.rkt index e5203b0..0cec8d6 100644 --- a/package.rkt +++ b/package.rkt @@ -19,7 +19,7 @@ (assemble/write-invoke (append (get-bootstrapping-code) (compile (parse source-code) 'val - 'next)) + next-linkage)) op) (fprintf op ";\n")) diff --git a/test-compiler.rkt b/test-compiler.rkt index d33ec06..9118e28 100644 --- a/test-compiler.rkt +++ b/test-compiler.rkt @@ -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. diff --git a/test-conform.rkt b/test-conform.rkt index d27ea60..52df364 100644 --- a/test-conform.rkt +++ b/test-conform.rkt @@ -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.