[movitz-cvs] CVS update: movitz/compiler.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Mon May 23 23:30:16 UTC 2005


Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv18807

Modified Files:
	compiler.lisp 
Log Message:
Fixed make-load-constant of a literal bignum.

Date: Tue May 24 01:30:15 2005
Author: ffjeld

Index: movitz/compiler.lisp
diff -u movitz/compiler.lisp:1.142 movitz/compiler.lisp:1.143
--- movitz/compiler.lisp:1.142	Tue May 24 00:40:55 2005
+++ movitz/compiler.lisp	Tue May 24 01:30:14 2005
@@ -8,7 +8,7 @@
 ;;;; Created at:    Wed Oct 25 12:30:49 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: compiler.lisp,v 1.142 2005/05/23 22:40:55 ffjeld Exp $
+;;;; $Id: compiler.lisp,v 1.143 2005/05/23 23:30:14 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -3986,9 +3986,17 @@
 	     (let ((value (movitz-bignum-value object)))
 	       (make-immediate-move (ldb (byte 32 0) value) :ecx)))
 	    (:lexical-binding
-	     (append `((:movl ,(new-make-compiled-constant-reference movitz-obj funobj)
-			      :eax))
-		     (make-store-lexical result-mode :eax nil funobj frame-map)))
+	     (cond
+	      ((and (typep movitz-obj 'movitz-bignum)
+		    (eq :untagged-fixnum-ecx
+			(new-binding-location result-mode frame-map :default nil)))
+	       (make-immediate-move (ldb (byte 32 0) (movitz-bignum-value movitz-obj))
+				    :ecx))
+	      (t #+ignore (warn "load to ~S at ~S from ~S"
+		       result-mode (new-binding-location result-mode frame-map) movitz-obj)
+		 (append `((:movl ,(new-make-compiled-constant-reference movitz-obj funobj)
+				  :eax))
+			 (make-store-lexical result-mode :eax nil funobj frame-map)))))
 	    (:push
 	     `((:pushl ,(new-make-compiled-constant-reference movitz-obj funobj))))
 	    ((:eax :ebx :ecx :edx :esi)




More information about the Movitz-cvs mailing list