From 03164578a4bd1aaaf07a4fabbe2e665931f7eef9 Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Thu, 12 May 2011 01:58:05 -0400 Subject: [PATCH] in the middle of integrating the real parser/compiler with the rest of the runtime --- test-compiler.rkt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test-compiler.rkt b/test-compiler.rkt index 53dc3d7..964c17c 100644 --- a/test-compiler.rkt +++ b/test-compiler.rkt @@ -5,9 +5,21 @@ "simulator-helpers.rkt" "compiler.rkt" "compiler-structs.rkt" - "parse.rkt" + #; "parse.rkt" + "parse-bytecode-5.1.1.rkt" "il-structs.rkt") +(require (prefix-in racket: racket/base)) + + +(define (parse stx) + (parameterize ([current-namespace (make-base-namespace)]) + (let ([bc (racket:compile stx)] + [op (open-output-bytes)]) + (write bc op) + (parse-bytecode + (open-input-bytes (get-output-bytes op)))))) + (define (run-compiler code) (compile (parse code) 'val next-linkage/drop-multiple))