diff --git a/zo-lib/compiler/zo-marshal.rkt b/zo-lib/compiler/zo-marshal.rkt index 6c4e657a3d..10f11c0b70 100644 --- a/zo-lib/compiler/zo-marshal.rkt +++ b/zo-lib/compiler/zo-marshal.rkt @@ -1307,17 +1307,19 @@ (define (encode-binding b name ht) (match b - [(free-id=?-binding base id) + [(free-id=?-binding base id phase) (hash-ref ht b (lambda () (match b - [(free-id=?-binding base id) + [(free-id=?-binding base id phase) (define bx (box #f)) (hash-set! ht b bx) (set-box! bx - (cons (encode-binding base name ht) - (cons (stx-obj-datum id) - (stx-obj-wrap id))))])))] + (cons + (cons (encode-binding base name ht) + (cons (stx-obj-datum id) + (stx-obj-wrap id))) + phase))])))] [_ (hash-ref! ht b (lambda () diff --git a/zo-lib/compiler/zo-parse.rkt b/zo-lib/compiler/zo-parse.rkt index dc53a5bc75..9c411c323f 100644 --- a/zo-lib/compiler/zo-parse.rkt +++ b/zo-lib/compiler/zo-parse.rkt @@ -1298,10 +1298,11 @@ (hash-ref! ht b (lambda () (match b - [(box (cons base-b (cons sym wraps))) + [(box (cons base-b (cons (cons sym wraps) phase))) (free-id=?-binding (decode-binding base-b ht) - (stx-obj sym wraps 'clean))] + (stx-obj sym (decode-wrap wraps ht) 'clean) + phase)] [(? symbol?) (local-binding b)] [else diff --git a/zo-lib/compiler/zo-structs.rkt b/zo-lib/compiler/zo-structs.rkt index c1b83b3478..68af6f58e4 100644 --- a/zo-lib/compiler/zo-structs.rkt +++ b/zo-lib/compiler/zo-structs.rkt @@ -205,7 +205,8 @@ (define-form-struct binding ()) (define-form-struct (free-id=?-binding binding) ([base (and/c binding? (not/c free-id=?-binding?))] - [id stx-obj?])) + [id stx-obj?] + [phase (or/c #f exact-integer?)])) (define-form-struct (local-binding binding) ([name symbol?])) (define-form-struct (module-binding binding) ([encoded any/c])) ;; Convert `module-binding` to `decoded-module-binding` with `decode-module-binding`: