[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-158-g15bb5
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-158-g15bb587 |
Date: |
Mon, 21 May 2012 16:06:44 +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=15bb587f45b718f08756993fec9274212cc7df58
The branch, stable-2.0 has been updated
via 15bb587f45b718f08756993fec9274212cc7df58 (commit)
from 6ccc66789695b5a09ce9b16c8c121f521df296e6 (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 15bb587f45b718f08756993fec9274212cc7df58
Author: Andy Wingo <address@hidden>
Date: Mon May 21 18:06:34 2012 +0200
fix arity check for applicable structs
* module/language/tree-il/analyze.scm (validate-arity): Fix for
applicable structs. Applicable structs are procedures, but not every
struct has a first slot, and not every struct with a procedure in its
first slot is applicable. Besides, the approach in this patch gives
better errors.
-----------------------------------------------------------------------
Summary of changes:
module/language/tree-il/analyze.scm | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/module/language/tree-il/analyze.scm
b/module/language/tree-il/analyze.scm
index c3ff9e2..88f81f3 100644
--- a/module/language/tree-il/analyze.scm
+++ b/module/language/tree-il/analyze.scm
@@ -1008,10 +1008,14 @@ accurate information is missing from a given `tree-il'
element."
(arity:allow-other-keys? a)))
(program-arities proc))))
((procedure? proc)
- (let ((arity (procedure-minimum-arity proc)))
- (values (procedure-name proc)
- (list (list (car arity) (cadr arity) (caddr arity)
- #f #f)))))
+ (if (struct? proc)
+ ;; An applicable struct.
+ (arities (struct-ref proc 0))
+ ;; An applicable smob.
+ (let ((arity (procedure-minimum-arity proc)))
+ (values (procedure-name proc)
+ (list (list (car arity) (cadr arity) (caddr arity)
+ #f #f))))))
(else
(let loop ((name #f)
(proc proc)
@@ -1196,11 +1200,6 @@ accurate information is missing from a given `tree-il'
element."
proc)))
(cond ((lambda? proc*)
(validate-arity proc* application #t))
- ((struct? proc*)
- ;; An applicable struct.
- (let ((p (struct-ref proc* 0)))
- (and (procedure? p)
- (validate-arity p application #f))))
((procedure? proc*)
(validate-arity proc* application #f)))))
toplevel-calls)))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-158-g15bb587,
Andy Wingo <=