Commit c51b6883 authored by Pascal Costanza's avatar Pascal Costanza
Browse files

Fixed a problem where documentation strings and declarations of method bodies...

Fixed a problem where documentation strings and declarations of method bodies were not put in the right places in Clozure Common Lisp (as reported by Greg Pfeil).

Ignore-this: c0611460a302b8b6828b71205fcae9b3

darcs-hash:cb5b0c2775d11d896aface73d71ea7f7703c357f
parent 4e6dbb85
......@@ -133,17 +133,20 @@
(cl:defmethod make-method-lambda ((gf generic-function) (method method) lambda-expression environment)
(declare (ignore environment) (optimize (speed 3) (space 0) (compilation-speed 0)))
(let ((methvar (gensym)))
(values
`(lambda (ccl::&method ,methvar ,@(cadr lambda-expression))
(flet ((call-next-method (&rest args)
(if args
(apply #'ccl::%call-next-method-with-args ,methvar args)
(ccl::%call-next-method ,methvar)))
(next-method-p () (ccl::%next-method-p ,methvar)))
(declare (inline call-next-method next-method-p))
,@(cddr lambda-expression)))
(let ((documentation (parse-method-body (cddr lambda-expression) lambda-expression)))
(multiple-value-bind (documentation declarations body)
(parse-method-body (cddr lambda-expression) lambda-expression)
(let ((methvar (gensym)))
(values
`(lambda (ccl::&method ,methvar ,@(cadr lambda-expression))
,@(when documentation `(,documentation))
,@(when declarations `((declare ,@declarations)))
(flet ((call-next-method (&rest args)
(if args
(apply #'ccl::%call-next-method-with-args ,methvar args)
(ccl::%call-next-method ,methvar)))
(next-method-p () (ccl::%next-method-p ,methvar)))
(declare (inline call-next-method next-method-p))
,@body))
(when documentation
(list :documentation documentation))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment