From 2efb39c39194f163f70f567eae5de0e5bf5f7cb0 Mon Sep 17 00:00:00 2001 From: Blake Johnson Date: Thu, 29 Jul 2010 15:52:12 -0600 Subject: [PATCH] another all-from-module fix original commit: 7653ce037bdb099a859a2008001ae271eaa65ba3 --- collects/compiler/zo-marshal.rkt | 8 ++++---- collects/compiler/zo-parse.rkt | 11 +++++------ collects/compiler/zo-structs.rkt | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index 2f809b47bb..d3b0210063 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -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)]) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 4c29dab5ce..e7adc72a82 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -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: (# 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 ) - [(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 diff --git a/collects/compiler/zo-structs.rkt b/collects/compiler/zo-structs.rkt index e776109093..8cc5042729 100644 --- a/collects/compiler/zo-structs.rkt +++ b/collects/compiler/zo-structs.rkt @@ -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?]))