[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-79-gdee4e3e
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, master, updated. v2.1.0-79-gdee4e3e |
Date: |
Fri, 02 Mar 2012 16:47:15 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=dee4e3ee3cbd4badeaf9beedfaf4cd8800f56a0b
The branch, master has been updated
via dee4e3ee3cbd4badeaf9beedfaf4cd8800f56a0b (commit)
via dab48cc567f931b275ad647db1e47135b63c6675 (commit)
from d489998364e5f20e81cf7cf12998e694626d2f6f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dee4e3ee3cbd4badeaf9beedfaf4cd8800f56a0b
Merge: d489998 dab48cc
Author: Andy Wingo <address@hidden>
Date: Fri Mar 2 17:46:52 2012 +0100
Merge remote-tracking branch 'origin/stable-2.0'
-----------------------------------------------------------------------
Summary of changes:
module/language/tree-il/analyze.scm | 18 +++++++++---------
test-suite/tests/tree-il.test | 21 +++++++++------------
2 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/module/language/tree-il/analyze.scm
b/module/language/tree-il/analyze.scm
index 5c1cb55..ae1e273 100644
--- a/module/language/tree-il/analyze.scm
+++ b/module/language/tree-il/analyze.scm
@@ -1358,16 +1358,16 @@ accurate information is missing from a given `tree-il'
element."
resort, return #t when EXP refers to the global variable SPECIAL-NAME."
(match exp
(($ <toplevel-ref> _ name)
- (let ((var (false-if-exception (module-variable env name))))
- (if var
- (eq? (false-if-exception (variable-ref var)) ; VAR may be unbound
- proc)
- (eq? name special-name)))) ; special hack to support local
aliases
+ (let ((var (module-variable env name)))
+ (if (and var (variable-bound? var))
+ (eq? (variable-ref var) proc)
+ (eq? name special-name)))) ; special hack to support local aliases
(($ <module-ref> _ module name public?)
- (let ((m (false-if-exception (if public?
- (resolve-interface module)
- (resolve-module module)))))
- (and m (eq? (false-if-exception (module-ref module name)) proc))))
+ (let* ((mod (if public?
+ (false-if-exception (resolve-interface module))
+ (resolve-module module #:ensure? #f)))
+ (var (and mod (module-variable mod name))))
+ (and var (variable-bound? var) (eq? (variable-ref var) proc))))
(_ #f)))
(define gettext? (cut proc-ref? <> gettext '_ <>))
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index 630e113..4dbe310 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -2234,18 +2234,15 @@
#:opts %opts-w-format
#:to 'assembly)))))
- (pass-if "non-literal format string with forward declaration"
- (let ((w (call-with-warnings
- (lambda ()
- (compile '(begin
- (define (foo)
- (format #t (_ "~A ~A!") "hello" "world"))
- (define _ bar))
- #:opts %opts-w-format
- #:to 'assembly)))))
- (and (= (length w) 1)
- (number? (string-contains (car w)
- "non-literal format string")))))
+ (pass-if "non-literal format string with (define _ gettext)"
+ (null? (call-with-warnings
+ (lambda ()
+ (compile '(begin
+ (define _ gettext)
+ (define (foo)
+ (format #t (_ "~A ~A!") "hello" "world")))
+ #:opts %opts-w-format
+ #:to 'assembly)))))
(pass-if "wrong format string"
(let ((w (call-with-warnings
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, master, updated. v2.1.0-79-gdee4e3e,
Andy Wingo <=