diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index 67e44567d4..83e629ee4e 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -87,7 +87,7 @@ (define (shared-obj-pos/modulo-v v) (define skip? #t) (λ (v2 #:share [share? #t]) - (if (and skip? (eq? v v2) (not (closure? v2))) + (if (and skip? (eq? v v2) #;(not (closure? v2))) (begin (set! skip? #f) #f) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 5e195c90a7..28d0bd4ac5 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -941,12 +941,14 @@ [ind (make-indirect #f)]) (symtab-write! cp l ind) (let* ([v (read-compact cp)] - [cl (make-closure v (gensym - (let ([s (lam-name v)]) - (cond - [(symbol? s) s] - [(vector? s) (vector-ref s 0)] - [else 'closure]))))]) + [cl (make-closure v + ; XXX Why call gensym here? + (gensym + (let ([s (lam-name v)]) + (cond + [(symbol? s) s] + [(vector? s) (vector-ref s 0)] + [else 'closure]))))]) (set-indirect-v! ind cl) ind))] [(svector) diff --git a/collects/tests/compiler/zo-exs.rkt b/collects/tests/compiler/zo-exs.rkt index 872d025b5a..79ab23f1e7 100644 --- a/collects/tests/compiler/zo-exs.rkt +++ b/collects/tests/compiler/zo-exs.rkt @@ -20,86 +20,86 @@ (test #;(roundtrip - (compilation-top 0 - (prefix 0 empty empty) - (list 1 (list 2 3) (list 2 3) 4 5))) + (compilation-top 0 + (prefix 0 empty empty) + (list 1 (list 2 3) (list 2 3) 4 5))) (roundtrip (compilation-top 0 (prefix 0 empty empty) (let* ([ph (make-placeholder #f)] - [x (closure - (lam 'name - empty - 0 - empty - #f - #() - empty - 0 - ph) - (gensym))]) + [x (indirect (closure + (lam 'name + empty + 0 + empty + #f + #() + empty + 0 + ph) + 'name))]) (placeholder-set! ph x) (make-reader-graph x)))) - - #;(roundtrip - (compilation-top - 0 - (prefix 0 (list #f) (list)) - (mod - 'simple - 'simple - (module-path-index-join #f #f) - (prefix - 0 - (list (module-variable - (module-path-index-join - "modbeg.rkt" - (module-path-index-join - "pre-base.rkt" - (module-path-index-join - "namespace.rkt" - (module-path-index-join "private/base.rkt" (module-path-index-join 'racket/base #f))))) 'print-values 0 0)) - (list)) - (list) - (list (list 0 (module-path-index-join 'racket/base #f)) (list 1) (list -1) (list #f)) - (list (apply-values - (toplevel 0 0 #f #t) - (application - (primval 231) - (list 1 'a)))) - (list) - (list (list) (list) (list)) - 2 - (toplevel 0 0 #f #f) - #(racket/language-info get-info #f) - #t))) - #;(roundtrip - (compilation-top 0 - (prefix 0 empty empty) - (current-directory))) - - #;(roundtrip - (compilation-top 0 - (prefix 0 empty empty) - (list (current-directory)))) #;(roundtrip - (compilation-top - 0 - (prefix 0 empty empty) - (cons #hasheq() - #hasheq()))) + (compilation-top + 0 + (prefix 0 (list #f) (list)) + (mod + 'simple + 'simple + (module-path-index-join #f #f) + (prefix + 0 + (list (module-variable + (module-path-index-join + "modbeg.rkt" + (module-path-index-join + "pre-base.rkt" + (module-path-index-join + "namespace.rkt" + (module-path-index-join "private/base.rkt" (module-path-index-join 'racket/base #f))))) 'print-values 0 0)) + (list)) + (list) + (list (list 0 (module-path-index-join 'racket/base #f)) (list 1) (list -1) (list #f)) + (list (apply-values + (toplevel 0 0 #f #t) + (application + (primval 231) + (list 1 'a)))) + (list) + (list (list) (list) (list)) + 2 + (toplevel 0 0 #f #f) + #(racket/language-info get-info #f) + #t))) + #;(roundtrip + (compilation-top 0 + (prefix 0 empty empty) + (current-directory))) + + #;(roundtrip + (compilation-top 0 + (prefix 0 empty empty) + (list (current-directory)))) + + #;(roundtrip + (compilation-top + 0 + (prefix 0 empty empty) + (cons #hasheq() + #hasheq()))) #;(local [(define (hash-test make-hash-placeholder) - (roundtrip - (compilation-top 0 - (prefix 0 empty empty) - (local [(define ht-ph (make-placeholder #f)) - (define ht (make-hash-placeholder (list (cons 'g ht-ph))))] - (placeholder-set! ht-ph ht) - (make-reader-graph ht)))))] - (hash-test make-hash-placeholder) - (hash-test make-hasheq-placeholder) - (hash-test make-hasheqv-placeholder))) + (roundtrip + (compilation-top 0 + (prefix 0 empty empty) + (local [(define ht-ph (make-placeholder #f)) + (define ht (make-hash-placeholder (list (cons 'g ht-ph))))] + (placeholder-set! ht-ph ht) + (make-reader-graph ht)))))] + (hash-test make-hash-placeholder) + (hash-test make-hasheq-placeholder) + (hash-test make-hasheqv-placeholder)))