Fixes bug (Re-provided identifiers are not tracked across submodules)

This commit is contained in:
Georges Dupéron 2016-08-04 18:59:42 +02:00
parent aca15dcc85
commit 804abc5ed7

View File

@ -92,7 +92,8 @@
(let ([v (resolve-get/tentative part ri `(form ,eb))]) (let ([v (resolve-get/tentative part ri `(form ,eb))])
(or (and v `(form ,eb)) (or (and v `(form ,eb))
`(def ,eb))))] `(def ,eb))))]
[need-result? (and need-result? (not here-result))]) [need-result? (and need-result? (not here-result))]
[rmp-name (resolved-module-path-name rmp)])
;; Even if we've found `here-result', look deeper so that we have ;; Even if we've found `here-result', look deeper so that we have
;; consistent `dep' results. ;; consistent `dep' results.
(let ([nest-result (let ([nest-result
@ -102,7 +103,9 @@
;; Not defined through this path, so keep looking ;; Not defined through this path, so keep looking
(loop queue rqueue need-result?) (loop queue rqueue need-result?)
;; Check parents, if we can get the source: ;; Check parents, if we can get the source:
(if (and (path? (resolved-module-path-name rmp)) (if (and (or (path? rmp-name)
(and (list? rmp-name)
(path? (car rmp-name))))
(not (hash-ref seen (cons export-phase rmp) #f))) (not (hash-ref seen (cons export-phase rmp) #f)))
(let ([exports (let ([exports
(hash-ref (hash-ref
@ -114,7 +117,12 @@
(lambda () (lambda ()
;; First, try using bytecode: ;; First, try using bytecode:
(module-compiled-exports (module-compiled-exports
(get-module-code (resolved-module-path-name rmp) (get-module-code (if (list? rmp-name)
(car rmp-name)
rmp-name)
#:submodule-path (if (list? rmp-name)
(cdr rmp-name)
'())
#:choose (lambda (src zo so) 'zo)))) #:choose (lambda (src zo so) 'zo))))
(lambda () (lambda ()
(try (try