Changeset 15459 for trunk/abcl/src/org/armedbear/lisp/clos.lisp
- Timestamp:
- 10/29/20 16:55:03 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/clos.lisp
r15427 r15459 2740 2740 (defvar *next-method-p-p*) 2741 2741 2742 ;;; FIXME this doesn't work for macroized references 2742 2743 (defun walk-form (form) 2743 2744 (cond ((atom form) … … 2749 2750 (walk-form (%car form)) 2750 2751 (walk-form (%cdr form))))) 2752 2753 (defmacro flet-call-next-method (args next-emfun &body body) 2754 `(flet ((call-next-method (&rest cnm-args) 2755 (if (null ,next-emfun) 2756 (error "No next method for generic function.") 2757 (funcall ,next-emfun (or cnm-args ,args)))) 2758 (next-method-p () 2759 (not (null ,next-emfun)))) 2760 (declare (ignorable (function call-next-method) 2761 (function next-method-p))) 2762 ,@body)) 2751 2763 2752 2764 (defun compute-method-function (lambda-expression) … … 2768 2780 (declare (ignorable ,(%car lambda-list))) 2769 2781 ,@declarations 2770 (flet ((call-next-method (&rest cnm-args) 2771 (if (null next-emfun) 2772 (error "No next method for generic function.") 2773 (funcall next-emfun (or cnm-args args)))) 2774 (next-method-p () 2775 (not (null next-emfun)))) 2776 (declare (ignorable (function call-next-method) 2777 (function next-method-p))) 2782 (flet-call-next-method args next-emfun 2778 2783 ,@body)))) 2779 2780 2784 (2 2781 2785 `(lambda (args next-emfun) … … 2785 2789 ,(%cadr lambda-list))) 2786 2790 ,@declarations 2787 (flet ((call-next-method (&rest cnm-args) 2788 (if (null next-emfun) 2789 (error "No next method for generic function.") 2790 (funcall next-emfun (or cnm-args args)))) 2791 (next-method-p () 2792 (not (null next-emfun)))) 2793 (declare (ignorable (function call-next-method) 2794 (function next-method-p))) 2795 2791 (flet-call-next-method args next-emfun 2796 2792 ,@body)))) 2797 2793 (3 … … 2804 2800 ,(%caddr lambda-list))) 2805 2801 ,@declarations 2806 (flet ((call-next-method (&rest cnm-args) 2807 (if (null next-emfun) 2808 (error "No next method for generic function.") 2809 (funcall next-emfun (or cnm-args args)))) 2810 (next-method-p () 2811 (not (null next-emfun)))) 2812 (declare (ignorable (function call-next-method) 2813 (function next-method-p))) 2802 (flet-call-next-method args next-emfun 2814 2803 ,@body)))) 2815 2804 (t … … 2817 2806 (apply #'(lambda ,lambda-list 2818 2807 ,@declarations 2819 (flet ((call-next-method (&rest cnm-args) 2820 (if (null next-emfun) 2821 (error "No next method for generic function.") 2822 (funcall next-emfun (or cnm-args args)))) 2823 (next-method-p () 2824 (not (null next-emfun)))) 2825 (declare (ignorable (function call-next-method) 2826 (function next-method-p))) 2808 (flet-call-next-method args next-emfun 2827 2809 ,@body)) 2828 2810 args)))) … … 2830 2812 (apply #'(lambda ,lambda-list 2831 2813 ,@declarations 2832 (flet ((call-next-method (&rest cnm-args) 2833 (if (null next-emfun) 2834 (error "No next method for generic function.") 2835 (funcall next-emfun (or cnm-args args)))) 2836 (next-method-p () 2837 (not (null next-emfun)))) 2838 (declare (ignorable (function call-next-method) 2839 (function next-method-p))) 2840 2814 (flet-call-next-method args next-emfun 2841 2815 ,@body)) 2842 2816 args)))))) … … 2871 2845 (next-method-p () nil)) 2872 2846 (declare (ignorable (function call-next-method) 2873 (function next-method-p)))2847 (function next-method-p))) 2874 2848 ,@body)) 2875 2849 nil))))))
Note: See TracChangeset
for help on using the changeset viewer.