[armedbear-cvs] r11646 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sun Feb 8 21:00:30 UTC 2009


Author: ehuelsmann
Date: Sun Feb  8 21:00:27 2009
New Revision: 11646

Log:
Fix compilation of Maxima: the wrong representation was returned.

Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Sun Feb  8 21:00:27 2009
@@ -6592,9 +6592,9 @@
     (case representation
       (:int
        (emit-invokevirtual +lisp-object-class+ "length" nil "I"))
-      (:long
+      ((:long :float :double)
        (emit-invokevirtual +lisp-object-class+ "length" nil "I")
-       (emit 'i2l))
+       (convert-representation :int representation))
       (:boolean
        ;; FIXME We could optimize this all away in unsafe calls.
        (emit-invokevirtual +lisp-object-class+ "length" nil "I")
@@ -7122,10 +7122,13 @@
 	  (compile-forms-and-maybe-emit-clear-values arg1 'stack nil
 						     arg2 'stack :int)
           (emit-invokevirtual +lisp-object-class+ "aref" '("I") "I"))
-         (:long
+         ((:long :float :double)
 	  (compile-forms-and-maybe-emit-clear-values arg1 'stack nil
 						     arg2 'stack :int)
-          (emit-invokevirtual +lisp-object-class+ "aref_long" '("I") "J"))
+          (emit-invokevirtual +lisp-object-class+ "aref_long" '("I") "J")
+          (when (or (eq representation :float)
+                    (eq representation :double))
+            (convert-represenation :long representation)))
          (:char
           (cond ((compiler-subtypep type1 'string)
                  (compile-form arg1 'stack nil) ; array




More information about the armedbear-cvs mailing list