unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] primitive resolution for public refs
@ 2012-03-12 16:42 BT Templeton
  2012-03-12 17:17 ` Noah Lavine
  2012-03-16 11:22 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: BT Templeton @ 2012-03-12 16:42 UTC (permalink / raw)
  To: guile-devel

* module/language/tree-il/primitives.scm (resolve-primitives!): Resolve
  public module-refs to primitives.
---
 module/language/tree-il/primitives.scm |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/module/language/tree-il/primitives.scm b/module/language/tree-il/primitives.scm
index 3c6769d..1dcab20 100644
--- a/module/language/tree-il/primitives.scm
+++ b/module/language/tree-il/primitives.scm
@@ -265,13 +265,15 @@
                                (module-variable mod name)))
                (lambda (name) (make-primitive-ref src name))))
        ((<module-ref> src mod name public?)
-        ;; for the moment, we're disabling primitive resolution for
-        ;; public refs because resolve-interface can raise errors.
-        (let ((m (and (not public?) (resolve-module mod))))
-          (and m 
-               (and=> (hashq-ref *interesting-primitive-vars*
-                                 (module-variable m name))
-                      (lambda (name) (make-primitive-ref src name))))))
+        (and=> (and=> (resolve-module mod)
+                      (if public?
+                          module-public-interface
+                          identity))
+               (lambda (m)
+                 (and=> (hashq-ref *interesting-primitive-vars*
+                                   (module-variable m name))
+                        (lambda (name)
+                          (make-primitive-ref src name))))))
        ((<call> src proc args)
         (and (primitive-ref? proc)
              (make-primcall src (primitive-ref-name proc) args)))
-- 
1.7.9.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-04-09 21:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 16:42 [PATCH] primitive resolution for public refs BT Templeton
2012-03-12 17:17 ` Noah Lavine
2012-03-12 18:03   ` BT Templeton
2012-03-12 19:42     ` Noah Lavine
2012-03-12 21:05       ` BT Templeton
2012-03-16 11:22 ` Ludovic Courtès
2012-03-16 19:38   ` BT Templeton
2012-03-21 21:58     ` Ludovic Courtès
2012-04-09 21:16       ` BT Templeton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).