Skip to content
Snippets Groups Projects
Commit 32660fa1 authored by pmai's avatar pmai
Browse files

Committed modified patch by Gerd Moellmann (from SBCL changes), that removes

make-parameter-references, replacing it with generation of ignorable
declarations for all specialized parameters.  Note that this differs from
the original patch, which generated ignorable declarations for all required
parameters, based on the current consensous on cmucl-imp.  Also turned
references to .pv-cell. and .next-method-call. into ignorable declarations.
parent 159a8830
Branches
Tags
No related merge requests found
......@@ -26,7 +26,7 @@
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/boot.lisp,v 1.41 2002/11/21 18:42:30 pmai Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/boot.lisp,v 1.42 2002/11/22 00:15:48 pmai Exp $")
(in-package :pcl)
......@@ -522,22 +522,19 @@ work during bootstrapping.
(mapcar (lambda (r s) (declare (ignore s)) r)
parameters
specializers))
(specialized-parameters
(loop for s in specialized-lambda-list
for p in required-parameters
when (listp s) collect p))
(slots (mapcar #'list required-parameters))
(calls (list nil))
(parameters-to-reference
(make-parameter-references specialized-lambda-list
required-parameters
declarations
method-name
specializers))
(class-declarations
`(declare
,@(remove nil
(mapcar (lambda (a s) (and (symbolp s)
(neq s t)
`(class ,a ,s)))
parameters
specializers))))
,@(mapcan (lambda (a s)
(when (and (symbolp s) (neq s t))
(list `(class ,a ,s))))
parameters
specializers)))
(method-lambda
;; Remove the documentation string and insert the
;; appropriate class declarations. The documentation
......@@ -547,9 +544,9 @@ work during bootstrapping.
;; are inserted to communicate the class of the method's
;; arguments to the code walk.
`(lambda ,lambda-list
(declare (ignorable ,@specialized-parameters))
,class-declarations
,@declarations
(progn ,@parameters-to-reference)
(block ,(if (listp generic-function-name)
(cadr generic-function-name)
generic-function-name)
......@@ -1042,27 +1039,6 @@ work during bootstrapping.
(standard-generic-function-p (gdefinition name))
(funcallable-instance-p (gdefinition name)))))
(defun make-parameter-references (specialized-lambda-list
required-parameters
declarations
method-name
specializers)
(flet ((ignoredp (symbol)
(dolist (form declarations)
(dolist (decl (cdr form))
(when (and (eq (car decl) 'ignore)
(memq symbol (cdr decl)))
(return-from ignoredp t))))))
(loop for s in specialized-lambda-list
and p in required-parameters
when (listp s)
if (ignoredp (car s)) do
(warn "In defmethod ~S, there is a~%~
redundant ignore declaration for the parameter ~S."
method-name specializers (car s))
else
collect (car s))))
(defvar *method-function-plist* (make-hash-table :test #'eq))
......
......@@ -26,7 +26,7 @@
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/vector.lisp,v 1.21 2002/10/29 16:20:45 pmai Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/vector.lisp,v 1.22 2002/11/22 00:15:48 pmai Exp $")
;;;
;;; Permutation vectors.
;;;
......@@ -989,7 +989,7 @@
`(list* :fast-function
(lambda (.pv-cell. .next-method-call. ,@args+rest-arg)
,@outer-decls
.pv-cell. .next-method-call.
(declare (ignorable .pv-cell. .next-method-call.))
(macrolet ((pv-env ((pv calls pv-table-symbol pv-parameters)
&rest forms)
(declare (ignore pv-table-symbol pv-parameters))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment