small fixes; trying to see if we can using 5.1.2

This commit is contained in:
Danny Yoo 2011-07-22 11:28:24 -04:00
parent b5bc821ef9
commit f6b11558b0
3 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@
(version-case
[(and (version<= "5.1.1" (version))
(version< (version) "5.1.2"))
(version< (version) "5.1.1.900"))
;; Parsing Racket 5.1.1 bytecode structures into our own structures.

View File

@ -6,7 +6,7 @@
(version-case
[(version<= "5.1.2" (version))
[(version<= "5.1.1.900" (version))
@ -443,7 +443,7 @@
(for/list ([v provided-values])
(match v
[(struct provided (name src src-name nom-mod
src-phase protected? insp))
src-phase protected?))
(make-ModuleProvide src-name name (subresolver src))])))]
[else
(loop (rest provides))]))))
@ -511,7 +511,7 @@
(define (parse-lam expr entry-point-label)
(match expr
[(struct lam (name flags num-params param-types rest? closure-map closure-types max-let-depth body))
[(struct lam (name flags num-params param-types rest? closure-map closure-types toplevel-map max-let-depth body))
(let ([lam-name (extract-lam-name name)])
(make-Lam lam-name
num-params
@ -532,7 +532,7 @@
(cond
[(hash-has-key? seen gen-id)
(match code
[(struct lam (name flags num-params param-types rest? closure-map closure-types max-let-depth body))
[(struct lam (name flags num-params param-types rest? closure-map closure-types toplevel-map max-let-depth body))
(let ([lam-name (extract-lam-name name)])
(make-EmptyClosureReference lam-name
num-params
@ -720,7 +720,7 @@
(define (parse-varref expr)
(match expr
[(struct varref (toplevel))
[(struct varref (toplevel dummy))
(make-VariableReference (parse-toplevel toplevel))]))
(define (parse-assign expr)

View File

@ -7,17 +7,17 @@
(version-case
[(and (version<= "5.1.1" (version))
(version< (version) "5.1.2"))
(version< (version) "5.1.1.900"))
(begin
(log-debug "Using 5.1.1 bytecode parser")
(require "parse-bytecode-5.1.1.rkt")
(provide (except-out (all-from-out "parse-bytecode-5.1.1.rkt")
parse-bytecode)))]
[(version<= "5.1.2" (version))
[(version<= "5.1.1.900" (version))
(begin
(log-debug "Using 5.1.2 bytecode parser")
(require "parse-bytecode-5.1.2.rkt")
(provide (except-out (all-from-out "parse-bytecode-5.1.1.rkt")
(provide (except-out (all-from-out "parse-bytecode-5.1.2.rkt")
parse-bytecode)))]
[else
(error 'parse-bytecode "Whalesong doesn't have a compatible parser for Racket ~a" (version))])