Fix bug: when CALL-NEXT-METHOD used in DEFINE-METHOD, the generated
authorChris Hanson <org/chris-hanson/cph>
Thu, 12 Jun 1997 07:33:58 +0000 (07:33 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 12 Jun 1997 07:33:58 +0000 (07:33 +0000)
code was using old calling conventions.

v7/src/sos/macros.scm

index 996b24cd552300bbc34d3a3a2af0bac21e1f99e5..4f79585c3506d58dca025e334e8cacd1b09b29aa 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: macros.scm,v 1.3 1997/06/11 07:45:04 cph Exp $
+;;; $Id: macros.scm,v 1.4 1997/06/12 07:33:58 cph Exp $
 ;;;
 ;;; Copyright (c) 1993-97 Massachusetts Institute of Technology
 ;;;
         (lambda ()
           (call-with-values (lambda () (call-next-method-used? body))
             (lambda (body used?)
-              `(,(if used? 'MAKE-CHAINED-METHOD 'MAKE-METHOD)
-                (LIST ,@specializers)
-                ,(make-named-lambda name
-                                    (if used?
-                                        (cons 'CALL-NEXT-METHOD required)
-                                        required)
-                                    optional
-                                    rest
-                                    body)))))))
+              (let ((s `(LIST ,@specializers))
+                    (l (make-named-lambda name required optional rest body)))
+                (if used?
+                    `(MAKE-CHAINED-METHOD ,s (LAMBDA (CALL-NEXT-METHOD) ,l))
+                    `(MAKE-METHOD ,s ,l))))))))
     (if (and (null? optional)
             (not rest)
             (not (eq? '<OBJECT> (car specializers))))