guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-4-138-g22


From: Ken Raeburn
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-4-138-g222831b
Date: Mon, 16 Nov 2009 19:26:14 +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=222831b443a14dd58ef646e8b313a38c38237f69

The branch, master has been updated
       via  222831b443a14dd58ef646e8b313a38c38237f69 (commit)
      from  d02f3137146bafe944d8c6736f9044dbf54868f9 (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 222831b443a14dd58ef646e8b313a38c38237f69
Author: Ken Raeburn <address@hidden>
Date:   Sun Nov 15 23:43:17 2009 -0500

    SCM_DEBUG fix: Don't apply SCM_CAR to non-pairs when walking argument
    lists in method cache matching.
    
    * libguile/goops.c (scm_mcache_lookup_cmethod): Don't apply SCM_CAR to
      non-pairs when walking argument lists in method cache matching.
      Don't check for CLASSP or symbol in the car slot, since the end of
      the specifier list is a non-pair.  Update comments to reflect new
      structure of method cache entry.
    * module/oops/goops/dispatch.scm: Update comments here too.

-----------------------------------------------------------------------

Summary of changes:
 libguile/goops.c              |   18 +++++++-----------
 module/oop/goops/dispatch.scm |    4 ++--
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/libguile/goops.c b/libguile/goops.c
index 33e1c6e..e3f403d 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -1779,12 +1779,12 @@ SCM_GLOBAL_SYMBOL (scm_sym_args, "args");
  *
  * Format #1:
  * (SCM_IM_DISPATCH ARGS N-SPECIALIZED
- *   #((TYPE1 ... ENV FORMALS FORM ...) ...)
+ *   #((TYPE1 ... . CMETHOD) ...)
  *   GF)
  *
  * Format #2:
  * (SCM_IM_HASH_DISPATCH ARGS N-SPECIALIZED HASHSET MASK
- *   #((TYPE1 ... ENV FORMALS FORM ...) ...)
+ *   #((TYPE1 ... CMETHOD) ...)
  *   GF)
  *
  * ARGS is either a list of expressions, in which case they
@@ -1795,9 +1795,6 @@ SCM_GLOBAL_SYMBOL (scm_sym_args, "args");
  * SCM_IM_DISPATCH expressions in generic functions always
  * have ARGS = the symbol `args' or the iloc address@hidden
  *
- * Need FORMALS in order to support varying arity.  This
- * also avoids the need for renaming of bindings.
- *
  * We should probably not complicate this mechanism by
  * introducing "optimizations" for getters and setters or
  * primitive methods.  Getters and setter will normally be
@@ -1853,19 +1850,18 @@ scm_mcache_lookup_cmethod (SCM cache, SCM args)
       long j = n;
       z = SCM_SIMPLE_VECTOR_REF (methods, i);
       ls = args; /* list of arguments */
-      if (!scm_is_null (ls))
+      /* More arguments than specifiers => z = CMETHOD, not a pair.
+       * Fewer arguments than specifiers => CAR != CLASS or `no-method'.  */
+      if (!scm_is_null (ls) && scm_is_pair (z))
        do
          {
-           /* More arguments than specifiers => CLASS != ENV */
            if (! scm_is_eq (scm_class_of (SCM_CAR (ls)), SCM_CAR (z)))
              goto next_method;
            ls = SCM_CDR (ls);
            z = SCM_CDR (z);
          }
-       while (j-- && !scm_is_null (ls));
-      /* Fewer arguments than specifiers => CAR != CLASS or `no-method' */
-      if (!scm_is_pair (z)
-          || (!SCM_CLASSP (SCM_CAR (z)) && !scm_is_symbol (SCM_CAR (z))))
+       while (j-- && !scm_is_null (ls) && scm_is_pair (z));
+      if (!scm_is_pair (z))
        return z;
     next_method:
       i = (i + 1) & mask;
diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm
index 88abf80..6a450c1 100644
--- a/module/oop/goops/dispatch.scm
+++ b/module/oop/goops/dispatch.scm
@@ -53,9 +53,9 @@
 ;;; Method cache
 ;;;
 
-;; (address@hidden args N-SPECIALIZED #((TYPE1 ... ENV FORMALS FORM1 ...) ...) 
GF)
+;; (address@hidden args N-SPECIALIZED #((TYPE1 ... . CMETHOD) ...) GF)
 ;; (address@hidden args N-SPECIALIZED HASHSET MASK
-;;             #((TYPE1 ... ENV FORMALS FORM1 ...) ...)
+;;             #((TYPE1 ... . CMETHOD) ...)
 ;;             GF)
 
 ;;; Representation


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]