* eval.c (SCM_IM_DISPATCH), objects.c (scm_mcache_lookup_cmethod):
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 7 Nov 2000 02:18:11 +0000 (02:18 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 7 Nov 2000 02:18:11 +0000 (02:18 +0000)
Count n_specialized + 1 turns before letting a match through.

libguile/eval.c
libguile/objects.c

index 92f20a2..5fa0063 100644 (file)
@@ -2292,7 +2292,7 @@ dispatch:
                           [scm_si_hashsets + hashset];
                      t.arg1 = SCM_CDR (t.arg1);
                    }
-                 while (--j && SCM_NIMP (t.arg1));
+                 while (j-- && SCM_NIMP (t.arg1));
                i &= mask;
                end = i;
              }
@@ -2312,7 +2312,7 @@ dispatch:
                      t.arg1 = SCM_CDR (t.arg1);
                      z = SCM_CDR (z);
                    }
-                 while (--j && SCM_NIMP (t.arg1));
+                 while (j-- && SCM_NIMP (t.arg1));
                /* Fewer arguments than specifiers => CAR != ENV */
                if (!(SCM_IMP (SCM_CAR (z)) || SCM_CONSP (SCM_CAR (z))))
                  goto next_method;
index 68836de..5fe6853 100644 (file)
@@ -276,7 +276,7 @@ scm_mcache_lookup_cmethod (SCM cache, SCM args)
                 [scm_si_hashsets + hashset];
            ls = SCM_CDR (ls);
          }
-       while (--j && SCM_NIMP (ls));
+       while (j-- && SCM_NIMP (ls));
       i &= mask;
       end = i;
     }
@@ -296,7 +296,7 @@ scm_mcache_lookup_cmethod (SCM cache, SCM args)
            ls = SCM_CDR (ls);
            z = SCM_CDR (z);
          }
-       while (--j && SCM_NIMP (ls));
+       while (j-- && SCM_NIMP (ls));
       /* Fewer arguments than specifiers => CAR != ENV */
       if (!(SCM_IMP (SCM_CAR (z)) || SCM_CONSP (SCM_CAR (z))))
        goto next_method;