fix problems with references to bindings at higher phases

original commit: 577cf4592e
This commit is contained in:
Matthew Flatt 2012-06-26 23:26:07 -06:00
parent 359eb87abb
commit 4be962e720
3 changed files with 4 additions and 3 deletions

View File

@ -610,7 +610,8 @@
(out-anything modidx out)
(out-anything sym out)
(unless (zero? phase)
(out-number -2 out))
(out-number -2 out)
(out-number phase out))
(out-number pos out)]
[(struct closure (lam gen-id))
(out-byte CPT_CLOSURE out)

View File

@ -859,7 +859,7 @@
[pos (read-compact-number cp)])
(let-values ([(mod-phase pos)
(if (= pos -2)
(values 1 (read-compact-number cp))
(values (read-compact-number cp) (read-compact-number cp))
(values 0 pos))])
(make-module-variable mod var pos mod-phase)))]
[(local-unbox)

View File

@ -43,7 +43,7 @@
(define-form-struct module-variable ([modidx module-path-index?]
[sym symbol?]
[pos exact-integer?]
[phase (or/c 0 1)])) ; direct access to exported id
[phase exact-nonnegative-integer?]))
;; Syntax object
(define ((alist/c k? v?) l)