small fixes; trying to see if we can using 5.1.2
This commit is contained in:
parent
b5bc821ef9
commit
f6b11558b0
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
(version-case
|
(version-case
|
||||||
[(and (version<= "5.1.1" (version))
|
[(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.
|
;; Parsing Racket 5.1.1 bytecode structures into our own structures.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
(version-case
|
(version-case
|
||||||
[(version<= "5.1.2" (version))
|
[(version<= "5.1.1.900" (version))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@
|
||||||
(for/list ([v provided-values])
|
(for/list ([v provided-values])
|
||||||
(match v
|
(match v
|
||||||
[(struct provided (name src src-name nom-mod
|
[(struct provided (name src src-name nom-mod
|
||||||
src-phase protected? insp))
|
src-phase protected?))
|
||||||
(make-ModuleProvide src-name name (subresolver src))])))]
|
(make-ModuleProvide src-name name (subresolver src))])))]
|
||||||
[else
|
[else
|
||||||
(loop (rest provides))]))))
|
(loop (rest provides))]))))
|
||||||
|
@ -511,7 +511,7 @@
|
||||||
|
|
||||||
(define (parse-lam expr entry-point-label)
|
(define (parse-lam expr entry-point-label)
|
||||||
(match expr
|
(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)])
|
(let ([lam-name (extract-lam-name name)])
|
||||||
(make-Lam lam-name
|
(make-Lam lam-name
|
||||||
num-params
|
num-params
|
||||||
|
@ -532,7 +532,7 @@
|
||||||
(cond
|
(cond
|
||||||
[(hash-has-key? seen gen-id)
|
[(hash-has-key? seen gen-id)
|
||||||
(match code
|
(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)])
|
(let ([lam-name (extract-lam-name name)])
|
||||||
(make-EmptyClosureReference lam-name
|
(make-EmptyClosureReference lam-name
|
||||||
num-params
|
num-params
|
||||||
|
@ -720,7 +720,7 @@
|
||||||
|
|
||||||
(define (parse-varref expr)
|
(define (parse-varref expr)
|
||||||
(match expr
|
(match expr
|
||||||
[(struct varref (toplevel))
|
[(struct varref (toplevel dummy))
|
||||||
(make-VariableReference (parse-toplevel toplevel))]))
|
(make-VariableReference (parse-toplevel toplevel))]))
|
||||||
|
|
||||||
(define (parse-assign expr)
|
(define (parse-assign expr)
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
|
|
||||||
(version-case
|
(version-case
|
||||||
[(and (version<= "5.1.1" (version))
|
[(and (version<= "5.1.1" (version))
|
||||||
(version< (version) "5.1.2"))
|
(version< (version) "5.1.1.900"))
|
||||||
(begin
|
(begin
|
||||||
(log-debug "Using 5.1.1 bytecode parser")
|
(log-debug "Using 5.1.1 bytecode parser")
|
||||||
(require "parse-bytecode-5.1.1.rkt")
|
(require "parse-bytecode-5.1.1.rkt")
|
||||||
(provide (except-out (all-from-out "parse-bytecode-5.1.1.rkt")
|
(provide (except-out (all-from-out "parse-bytecode-5.1.1.rkt")
|
||||||
parse-bytecode)))]
|
parse-bytecode)))]
|
||||||
[(version<= "5.1.2" (version))
|
[(version<= "5.1.1.900" (version))
|
||||||
(begin
|
(begin
|
||||||
(log-debug "Using 5.1.2 bytecode parser")
|
(log-debug "Using 5.1.2 bytecode parser")
|
||||||
(require "parse-bytecode-5.1.2.rkt")
|
(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)))]
|
parse-bytecode)))]
|
||||||
[else
|
[else
|
||||||
(error 'parse-bytecode "Whalesong doesn't have a compatible parser for Racket ~a" (version))])
|
(error 'parse-bytecode "Whalesong doesn't have a compatible parser for Racket ~a" (version))])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user