From 0b148842df01685f9890ba9c3bda3f30bcdbeb36 Mon Sep 17 00:00:00 2001
From: gerd <gerd>
Date: Tue, 2 Sep 2003 15:00:58 +0000
Subject: [PATCH] 	(apply #'+ 1000 <some-list>) byte-compiled into a call
 	of two-arg-+.

	* src/compiler/byte-comp.lisp (generate-byte-code-for-ref):
	Don't use two-arg versions for mv-combinations.
---
 compiler/byte-comp.lisp      | 16 +++++++---------
 general-info/release-19a.txt |  2 ++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/compiler/byte-comp.lisp b/compiler/byte-comp.lisp
index 0b93ee89f..4cc5cb647 100644
--- a/compiler/byte-comp.lisp
+++ b/compiler/byte-comp.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/byte-comp.lisp,v 1.36 2003/08/25 20:51:00 gerd Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/byte-comp.lisp,v 1.37 2003/09/02 15:00:58 gerd Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1297,14 +1297,12 @@
 		       (eq (global-var-kind leaf)
 			   :global-function)))
 	  (let* ((name (global-var-name leaf))
-		 (found (gethash name *two-arg-functions*)))
-	    (output-push-fdefinition
-	     segment
-	     (if (and found
-		      (= (length (basic-combination-args (continuation-dest cont)))
-			 2))
-		 found
-		 name))))
+		 (dest (continuation-dest cont))
+		 (two-arg
+		  (when (and (not (mv-combination-p dest))
+			     (= 2 (length (basic-combination-args dest))))
+		    (gethash name *two-arg-functions*))))
+	    (output-push-fdefinition segment (or two-arg name))))
 	 ((eql values 0)
 	  ;; Real easy!
 	  nil)
diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt
index 41a872f72..44c9a41fe 100644
--- a/general-info/release-19a.txt
+++ b/general-info/release-19a.txt
@@ -173,6 +173,8 @@ New in this release:
      - UNIX-MMAP not accepting a null fd, preventing anonymous
        mappings.
      - SIGPROF having the wrong value on GNU/Linux.
+     - Wrong byte-code being generated for (APPLY #'+ <X> <Y>) and
+       similar cases.
 
   * Other changes:
      - CREATE-REQUEST-SERVER has an additional :reuse-address keyword
-- 
GitLab