1.0.8.28: split REAL-MAKE-METHOD-LAMBDA back into two parts
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 18 Aug 2007 03:50:49 +0000 (03:50 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 18 Aug 2007 03:50:49 +0000 (03:50 +0000)
* Turns out my earlier merging of REAL-MAKE-METHOD-LAMBDA
  and MAKE-METHOD-LAMBDA-INTERNAL was ill adviced: the split
  is good to have so that redefining the latter in the
  final image actually changes the behaviour of the system.

* Add an explanatory comment.

src/pcl/boot.lisp
version.lisp-expr

index b056940..56317d7 100644 (file)
@@ -575,7 +575,21 @@ bootstrapping.
   (setf (gdefinition 'make-method-initargs-form)
         (symbol-function 'real-make-method-initargs-form)))
 
+;;; When bootstrapping PCL MAKE-METHOD-LAMBDA starts out as a regular
+;;; functions: REAL-MAKE-METHOD-LAMBDA set to the fdefinition of
+;;; MAKE-METHOD-LAMBDA. Once generic functions are born, the
+;;; REAL-MAKE-METHOD lambda is used as the body of the default method.
+;;; MAKE-METHOD-LAMBDA-INTERNAL is split out into a separate function
+;;; so that changing it in a live image is easy, and changes actually
+;;; take effect.
 (defun real-make-method-lambda (proto-gf proto-method method-lambda env)
+  (make-method-lambda-internal proto-gf proto-method method-lambda env))
+
+(unless (fboundp 'make-method-lambda)
+  (setf (gdefinition 'make-method-lambda)
+        (symbol-function 'real-make-method-lambda)))
+
+(defun make-method-lambda-internal (proto-gf proto-method method-lambda env)
   (declare (ignore proto-gf proto-method))
   (unless (and (consp method-lambda) (eq (car method-lambda) 'lambda))
     (error "The METHOD-LAMBDA argument to MAKE-METHOD-LAMBDA, ~S, ~
@@ -731,10 +745,6 @@ bootstrapping.
                           ,@(when plist `(plist ,plist))
                           ,@(when documentation `(:documentation ,documentation)))))))))))
 
-(unless (fboundp 'make-method-lambda)
-  (setf (gdefinition 'make-method-lambda)
-        (symbol-function 'real-make-method-lambda)))
-
 (defun real-make-method-specializers-form
     (proto-gf proto-method specializer-names env)
   (declare (ignore env proto-gf proto-method))
index eaf4ef1..2609d30 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.8.27"
+"1.0.8.28"