save modidx submodule path in bytecode form

This change should have been part of 9ba663aa77.

original commit: f099eec2af
This commit is contained in:
Matthew Flatt 2012-04-26 21:10:19 -06:00
parent 7afd70f96e
commit ac6210c42e
3 changed files with 11 additions and 3 deletions

View File

@ -161,7 +161,8 @@
(define (mpi->string modidx)
(cond
[(symbol? modidx) modidx]
[else (collapse-module-path-index modidx (current-directory))]))
[else
(collapse-module-path-index modidx (current-directory))]))
(define (decompile-module mod-form orig-stack stx-ht mod-name)
(match mod-form

View File

@ -895,7 +895,9 @@
(out-byte CPT_MODULE_INDEX out)
(let-values ([(name base) (module-path-index-split v)])
(out-anything name out)
(out-anything base out))]
(out-anything base out)
(unless (or name base)
(out-anything (module-path-index-submodule v) out)))]
[(stx encoded)
(out-byte CPT_STX out)
(out-anything encoded out)]

View File

@ -840,7 +840,12 @@
(eq? cpt-tag 'let-one-unused))]
[(branch)
(make-branch (read-compact cp) (read-compact cp) (read-compact cp))]
[(module-index) (module-path-index-join (read-compact cp) (read-compact cp))]
[(module-index)
(define name (read-compact cp))
(define base (read-compact cp))
(if (or name base)
(module-path-index-join name base)
(module-path-index-join #f #f (read-compact cp)))]
[(module-var)
(let ([mod (read-compact cp)]
[var (read-compact cp)]