From 98d4cc43f50aa0f07b611097c184eb898729998a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 30 Apr 2006 01:43:55 +0000 Subject: [PATCH] Fix bug: wrong number of tags was being stored in cache when variadic generic procedure had a method with more than the minimum number of arguments and was called with that number of arguments. (Thanks to Zev Benjamin for finding this.) --- v7/src/runtime/generic.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/generic.scm b/v7/src/runtime/generic.scm index 8d854e38f..91514c459 100644 --- a/v7/src/runtime/generic.scm +++ b/v7/src/runtime/generic.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: generic.scm,v 1.13 2005/04/16 04:26:35 cph Exp $ +$Id: generic.scm,v 1.14 2006/04/30 01:43:55 cph Exp $ -Copyright 1996,2003,2005 Massachusetts Institute of Technology +Copyright 1996,2003,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -24,6 +24,7 @@ USA. |# ;;;; Generic Procedures +;;; package: (runtime generic-procedure) (declare (usual-integrations) (integrate-external "gentag" "gencache")) @@ -262,8 +263,9 @@ USA. (let ((tags (let ((p (list 'TAGS))) (do ((args args (cdr args)) - (p p (cdr p))) - ((not (pair? args))) + (p p (cdr p)) + (i (generic-record/arity-min record) (fix:- i 1))) + ((not (fix:> i 0))) (set-cdr! p (list (dispatch-tag (car args))))) (cdr p)))) (let ((procedure -- 2.25.1