mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +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:
parent
8cff7f54dc
commit
33e9a90d7b
1 changed files with 11 additions and 8 deletions
|
@ -255,14 +255,17 @@
|
|||
(define local-definitions
|
||||
(make-hash-table))
|
||||
|
||||
(let collect-local-definitions ((x x))
|
||||
(record-case x
|
||||
((<toplevel-define> name)
|
||||
(hashq-set! local-definitions name #t))
|
||||
((<seq> head tail)
|
||||
(collect-local-definitions head)
|
||||
(collect-local-definitions tail))
|
||||
(else #f)))
|
||||
;; 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))
|
||||
(record-case x
|
||||
((<toplevel-define> name)
|
||||
(hashq-set! local-definitions name #t))
|
||||
((<seq> head tail)
|
||||
(collect-local-definitions head)
|
||||
(collect-local-definitions tail))
|
||||
(else #f))))
|
||||
|
||||
(post-order
|
||||
(lambda (x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue