Diff of /src/cmp/cmpfun.lsp [507723] .. [c503bf] Maximize Restore

  Switch to side-by-side view

--- a/src/cmp/cmpfun.lsp
+++ b/src/cmp/cmpfun.lsp
@@ -17,28 +17,33 @@
 
 (defun c1apply (args)
   (check-args-number 'APPLY args 2)
-  (let* ((fun (first args))
-	 (arguments (rest args)))
-    (cond ((and (consp fun)
-		(eq (first fun) 'LAMBDA))
-	   (optimize-funcall/apply-lambda (cdr fun) arguments t))
-	  ((and (consp fun)
-		(eq (first fun) 'EXT::LAMBDA-BLOCK))
-	   (setf fun (macroexpand-1 fun))
-	   (optimize-funcall/apply-lambda (cdr fun) arguments t))
-	  ((and (consp fun)
-		(eq (first fun) 'FUNCTION)
-		(consp (second fun))
-		(member (caadr fun) '(LAMBDA EXT::LAMBDA-BLOCK)))
-	   (c1apply (list* (second fun) arguments)))
-	  (t
-	   (let ((form (c1funcall (list* '#'APPLY args))))
+  (flet ((default-apply (fun arguments)
+	   (let ((form (c1funcall (list* '#'APPLY fun arguments))))
 	     (when (and (consp fun) (eq (first fun) 'FUNCTION))
 	       (let* ((fname (second fun))
 		      (type (get-return-type fname)))
 		 (when type
 		   (setf (c1form-type form) type))))
-	     form)))))
+	     form)))
+    (let* ((fun (first args))
+	   (arguments (rest args)))
+      (cond ((eql (first (last arguments)) 'clos::.combined-method-args.)
+	     ;; Uses frames instead of lists as last argumennt
+	     (default-apply fun arguments))
+	    ((and (consp fun)
+		  (eq (first fun) 'LAMBDA))
+	     (optimize-funcall/apply-lambda (cdr fun) arguments t))
+	    ((and (consp fun)
+		  (eq (first fun) 'EXT::LAMBDA-BLOCK))
+	     (setf fun (macroexpand-1 fun))
+	     (optimize-funcall/apply-lambda (cdr fun) arguments t))
+	    ((and (consp fun)
+		  (eq (first fun) 'FUNCTION)
+		  (consp (second fun))
+		  (member (caadr fun) '(LAMBDA EXT::LAMBDA-BLOCK)))
+	     (c1apply (list* (second fun) arguments)))
+	    (t
+	     (default-apply fun arguments))))))
 
 ;;----------------------------------------------------------------------
 ;; We transform BOOLE into the individual operations, which have