Changeset 13585


Ignore:
Timestamp:
09/08/11 14:49:11 (10 years ago)
Author:
ehuelsmann
Message:

Don't hard code variable name in a single function template
across multiple generating functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r13584 r13585  
    10011001(defconstant +gf-args-var+ (make-symbol "GF-ARGS-VAR"))
    10021002
    1003 (defun wrap-with-call-method-macro (gf forms)
     1003(defun wrap-with-call-method-macro (gf args-var forms)
    10041004  `(macrolet
    10051005       ((call-method (method &optional next-method-list)
     
    10161016                       ;; the null lexical environment augmented
    10171017                       ;; with a binding for CALL-METHOD
    1018                        ,(wrap-with-call-method-macro ,gf (second method)))))
     1018                       ,(wrap-with-call-method-macro ,gf
     1019                                                     ,args-var
     1020                                                     (second method)))))
    10191021              (t (%method-function method)))
    1020             args
     1022            ,args-var
    10211023            ,(unless (null next-method-list)
    10221024                     ;; by not generating an emf when there are no next methods,
     
    11061108  (&key name lambda-list args-lambda-list generic-function-symbol
    11071109        method-group-specs declarations forms &allow-other-keys)
     1110  (declare (ignore name))
    11081111  (let ((methods (gensym)))
    11091112    `(lambda (,generic-function-symbol ,methods ,@lambda-list)
     
    20822085               (let ((result (if arguments
    20832086                                 (apply function gf methods arguments)
    2084                                  (funcall function gf methods))))
    2085                  `(lambda (args)
    2086                     (let ((gf-args-var args))
    2087                       ,(wrap-with-call-method-macro gf (list result))))))))
     2087                                 (funcall function gf methods)))
     2088                     (args-var (gensym)))
     2089                 `(lambda (,args-var)
     2090                    (let ((gf-args-var ,args-var))
     2091                      ,(wrap-with-call-method-macro gf args-var
     2092                                                    (list result))))))))
    20882093      (t
    20892094       (let ((mc-obj (get mc-name 'method-combination-object)))
Note: See TracChangeset for help on using the changeset viewer.