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

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Jan 24 18:08:11 UTC 2009


Author: ehuelsmann
Date: Sat Jan 24 18:08:08 2009
New Revision: 11583

Log:
Revert change to p2-minus: we can't do this without adding a new LispObject primitive operation,
which I tried, but takes too long for now.

Note: the operation required would be negateAndAdd(int/long), which is easy except
      for that you need to add it to all number primitives...

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	Sat Jan 24 18:08:08 2009
@@ -6862,7 +6862,8 @@
                     arg2 'stack (when (fixnum-type-p type2) :int))
               (when (fixnum-type-p type1)
                 (emit 'swap))
-              (emit-invokevirtual +lisp-object-class+ "add" '("I") +lisp-object+)
+              (emit-invokevirtual +lisp-object-class+ "add"
+                                  '("I") +lisp-object+)
               (fix-boxing representation result-type)
               (emit-move-from-stack target representation))
              (t
@@ -6933,13 +6934,12 @@
               (emit 'lsub)
               (convert-long representation)
               (emit-move-from-stack target representation))
-             ((or (fixnum-type-p type1) (fixnum-type-p type2))
+             ((fixnum-type-p type2)
 	      (compile-forms-and-maybe-emit-clear-values
-                    arg1 'stack (when (fixnum-type-p type1) :int)
-                    arg2 'stack (when (fixnum-type-p type2) :int))
-              (when (fixnum-type-p type1)
-                (emit 'swap))
-              (emit-invokevirtual +lisp-object-class+ "subtract"
+                    arg1 'stack nil
+                    arg2 'stack :int)
+              (emit-invokevirtual +lisp-object-class+
+                                  "subtract"
                                   '("I") +lisp-object+)
               (fix-boxing representation result-type)
               (emit-move-from-stack target representation))




More information about the armedbear-cvs mailing list