-
- Downloads
CLHS 7.6.5 keyword argument checking for calls to generic
functions. Found by Paul Dietz, of course. This also includes some minor code cleanup and a fix for a bug caused by a typo. * src-gf/pcl/std-class.lisp (compute-effective-slot-definition-initargs): Reformatted to make it readable on a tty. * src-gf/pcl/methods.lisp (set-condition-svuc-method): Fix a typo. * src-gf/pcl/low.lisp (parse-lambda-list): Add an ignore declaration. * src-gf/pcl/init.lisp (valid-initargs): Use method-lambda-list*. * src-gf/pcl/dfun.lisp (use-caching-dfun-p): Use generic-function-methods*. (use-constant-value-dfun-p): Ditto. (use-dispatch-dfun-p): Don't use dispatching dfuns when we must check keyword arguments according to CLHS 7.6.5, because this computes emfs for sets methods that aren't applicable together in the usual sense; this screws up emf keyword argument checking, of course. (make-initial-dfun): Use gf-arg-info*. (update-dfun): Use generic-function-name*. (final-accessor-dfun-type, make-accessor-table) (compute-applicable-methods-using-types) (compute-applicable-methods-using-types): Likewise. * src-gf/pcl/combin.lisp (standard-compute-effective-method): Don't use the single-call-method optimization if we must check keyword arguments according to CLHS 7.6.5. (callable-generator-for-emf): Rewritten to add a keyword argument check to the emf. (emfs-must-check-applicable-keywords-p) (compute-applicable-keywords, check-applicable-keywords): New functions. (odd-number-of-keyword-arguments, invalid-keyword-argument): Moved here from boot.lisp. (make-effective-method-lambda): Add a check-applicable-keywords form to the emf, if appropriate. (memf-test-converter, memf-code-converter) (memf-constant-converter): Deal with check-applicable-keywords. (*applicable-methods*): New variable. (make-callable): Bind it. (make-emf-name): Use generic-function-name*. * src/pcl/braid.lisp (ensure-non-standard-class): Remove an used branch. * src/pcl/boot.lisp (*make-method-lambda-gf-name*): Removed. (expand-defmethod): Don't bind it. (make-method-lambda-internal): Don't add &key to the method function's lambda-list if the gf has &key. (bind-args): Rewritten. Don't do keyword checking as this is done in emfs now. (get-key-arg, get-key-arg1): Simplified; do less checking. (generic-function-name*, generic-function-methods*) (gf-arg-info*, method-lambda-list*): New functions. (check-method-arg-info): Use them. (gf-lambda-list-from-method): New function. (gf-lambda-list): Use it. Don't add &allow-other-keys to a gf's lambda-list if a method has &key. (get-generic-function-info): Use gf-arg-info*. (parse-specialized-lambda-list): Add an ignore declaration. (odd-number-of-keyword-arguments, invalid-keyword-argument): Moved to combin.lisp. (check-generic-function-lambda-list): Remove &more stuff because that's checked elsewhere now (and Python can even tell it is). * src-gf/pcl/ctor.lisp (install-optimized-constructor): Remove an unmatched ).
Showing
- pcl/boot.lisp 104 additions, 158 deletionspcl/boot.lisp
- pcl/braid.lisp 6 additions, 10 deletionspcl/braid.lisp
- pcl/combin.lisp 156 additions, 28 deletionspcl/combin.lisp
- pcl/ctor.lisp 2 additions, 2 deletionspcl/ctor.lisp
- pcl/dfun.lisp 19 additions, 35 deletionspcl/dfun.lisp
- pcl/init.lisp 2 additions, 4 deletionspcl/init.lisp
- pcl/low.lisp 2 additions, 1 deletionpcl/low.lisp
- pcl/methods.lisp 3 additions, 5 deletionspcl/methods.lisp
- pcl/std-class.lisp 7 additions, 4 deletionspcl/std-class.lisp
Loading
Please register or sign in to comment