Changeset 11578


Ignore:
Timestamp:
01/24/09 10:12:17 (12 years ago)
Author:
ehuelsmann
Message:

Miscelanious:

  • Merge [within p2-plus] (fixnum-type-p type2) case with (fixnum-type-p type1)
  • Add some cases handled by p2-plus to p2-minus too.
  • Fix parenthetical error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r11571 r11578  
    22892289            (emit-invokevirtual +lisp-bignum-class+ "floatValue" nil "F"))
    22902290           ((typep form 'single-float)
    2291             (emit 'ldc (declare-float form)))
     2291            (emit 'ldc (pool-float form)))
    22922292           ((typep form 'double-float)
    2293             (emit 'ldc2_w (declare-double form))
     2293            (emit 'ldc2_w (pool-double form))
    22942294            (emit 'd2f))
    22952295           (t (assert nil)))
     
    23072307            (emit 'getfield *this-class* (declare-bignum form)
    23082308                  +lisp-bignum+)
    2309             (emit-invokevirtual +lisp-bignum-class+ "doubleValue" nil "D")
     2309            (emit-invokevirtual +lisp-bignum-class+ "doubleValue" nil "D"))
    23102310           ((typep form 'single-float)
    2311             (emit 'ldc (declare-float form))
     2311            (emit 'ldc (pool-float form))
    23122312            (emit 'f2d))
    23132313           ((typep form 'double-float)
    2314             (emit 'ldc2_w (declare-double form)))
     2314            (emit 'ldc2_w (pool-double form)))
    23152315           (t (assert nil)))
    23162316     (emit-move-from-stack target representation)
    2317      (return-from compile-constant))))
     2317     (return-from compile-constant)))
    23182318  (cond ((fixnump form)
    23192319         (let ((translation (case form
     
    67876787        (compile-forms-and-maybe-emit-clear-values arg2 'stack nil)
    67886788              (emit-invoke-method "incr" target representation))
    6789              ((fixnum-type-p type1)
    6790         (compile-forms-and-maybe-emit-clear-values arg1 'stack :int
    6791                arg2 'stack nil)
    6792               (emit 'swap)
    6793               (emit-invokevirtual +lisp-object-class+ "add" '("I") +lisp-object+)
    6794               (fix-boxing representation result-type)
    6795               (emit-move-from-stack target representation))
    6796              ((fixnum-type-p type2)
    6797         (compile-forms-and-maybe-emit-clear-values arg1 'stack nil
    6798                arg2 'stack :int)
     6789             ((or (fixnum-type-p type1) (fixnum-type-p type2))
     6790        (compile-forms-and-maybe-emit-clear-values
     6791                    arg1 'stack (when (fixnum-type-p type1) :int)
     6792                    arg2 'stack (when (fixnum-type-p type2) :int))
     6793              (when (fixnum-type-p type1)
     6794                (emit 'swap))
    67996795              (emit-invokevirtual +lisp-object-class+ "add" '("I") +lisp-object+)
    68006796              (fix-boxing representation result-type)
     
    68686864              (convert-long representation)
    68696865              (emit-move-from-stack target representation))
    6870              ((fixnum-type-p type2)
    6871         (compile-forms-and-maybe-emit-clear-values arg1 'stack nil
    6872                arg2 'stack :int)
    6873               (emit-invokevirtual +lisp-object-class+ "subtract" '("I") +lisp-object+)
     6866             ((or (fixnum-type-p type1) (fixnum-type-p type2))
     6867        (compile-forms-and-maybe-emit-clear-values
     6868                    arg1 'stack (when (fixnum-type-p type1) :int)
     6869                    arg2 'stack (when (fixnum-type-p type2) :int))
     6870              (when (fixnum-type-p type1)
     6871                (emit 'swap))
     6872              (emit-invokevirtual +lisp-object-class+ "subtract"
     6873                                  '("I") +lisp-object+)
    68746874              (fix-boxing representation result-type)
    68756875              (emit-move-from-stack target representation))
Note: See TracChangeset for help on using the changeset viewer.