1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 23:00:22 +02:00

Always resolve-primitives in the root module.

* module/language/tree-il/primitives.scm (resolve-primitives): If we are
  compiling in the root module, ignore local definitions.
This commit is contained in:
Andy Wingo 2013-10-23 16:57:14 +02:00
parent 8cff7f54dc
commit 33e9a90d7b

View file

@ -255,6 +255,9 @@
(define local-definitions (define local-definitions
(make-hash-table)) (make-hash-table))
;; Assume that any definitions with primitive names in the root module
;; have the same semantics as the primitives.
(unless (eq? mod the-root-module)
(let collect-local-definitions ((x x)) (let collect-local-definitions ((x x))
(record-case x (record-case x
((<toplevel-define> name) ((<toplevel-define> name)
@ -262,7 +265,7 @@
((<seq> head tail) ((<seq> head tail)
(collect-local-definitions head) (collect-local-definitions head)
(collect-local-definitions tail)) (collect-local-definitions tail))
(else #f))) (else #f))))
(post-order (post-order
(lambda (x) (lambda (x)