another all-from-module fix

original commit: 7653ce037b
This commit is contained in:
Blake Johnson 2010-07-29 15:52:12 -06:00 committed by Jay McCarthy
parent f7c42c1e6a
commit 2efb39c391
3 changed files with 11 additions and 12 deletions

View File

@ -586,12 +586,12 @@
(define encode-all-from-module
(match-lambda
[(struct all-from-module (path phase src-phase (list) #f))
(list* path phase src-phase)]
[(struct all-from-module (path phase src-phase #f #f))
(list* path phase src-phase)]
[(struct all-from-module (path phase src-phase exns #f))
(list* path phase exns src-phase)]
[(struct all-from-module (path phase src-phase exns prefix))
(list* path phase src-phase (append exns prefix))]))
[(struct all-from-module (path phase src-phase exns (vector prefix)))
(list* path phase src-phase exns prefix)]))
(define (encode-wraps wraps)
(for/list ([wrap (in-list wraps)])

View File

@ -26,8 +26,6 @@
I think parse-module-path-index was only used for debugging, so it is short-circuited now
collects/browser/compiled/browser_scrbl.zo (eg) contains a all-from-module that looks like: (#<module-path-index> 0 (1363072) . #f) --- that doesn't seem to match the spec
|#
;; ----------------------------------------
;; Bytecode unmarshalers for various forms
@ -587,7 +585,7 @@
[(integer? a)
(unmarshal-stx-get/decode cp a (lambda (cp v) (aloop v)))]
; A mark (not actually a number as the C says, but a (list <num>)
[(and (pair? a) (null? (cdr a)) (number? (car a)))
[(and (pair? a) (number? (car a)))
(make-wrap-mark (car a))]
[(vector? a)
@ -617,10 +615,11 @@
(map (local [(define (phase? v)
(or (number? v) (not v)))]
(match-lambda
[(list* path (? phase? phase) (? phase? src-phase) exn ... prefix)
[(list* path (? phase? phase) (? phase? src-phase)
(list exn ...) prefix)
(make-all-from-module
(parse-module-path-index cp path)
phase src-phase exn prefix)]
phase src-phase exn (vector prefix))]
[(list* path (? phase? phase) (list exn ...) (? phase? src-phase))
(make-all-from-module
(parse-module-path-index cp path)
@ -628,7 +627,7 @@
[(list* path (? phase? phase) (? phase? src-phase))
(make-all-from-module
(parse-module-path-index cp path)
phase src-phase empty #f)]))
phase src-phase #f #f)]))
unmarshals)
(decode-renames renames)
mark-renames

View File

@ -179,8 +179,8 @@
(define-form-struct all-from-module ([path module-path-index?]
[phase (or/c exact-integer? #f)]
[src-phase any/c] ; should be (or/c exact-integer? #f)
[exceptions list?] ; should be (listof symbol?)
[prefix any/c])) ; should be (or/c symbol? #f)
[exceptions (or/c (listof symbol?) #f)] ; should be (listof symbol?)
[prefix (or/c (vector/c (or/c symbol? #f)) #f)])) ; should be (or/c symbol? #f)
(define-form-struct nominal-path ())
(define-form-struct (simple-nominal-path nominal-path) ([value module-path-index?]))