[armedbear-cvs] r12845 - branches/generic-class-file/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Aug 1 21:16:49 UTC 2010
Author: ehuelsmann
Date: Sun Aug 1 17:16:48 2010
New Revision: 12845
Log:
Continued integration of CLASS-NAME: use it for
+lisp-fixnum+ and +lisp-bignum+.
Modified:
branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp
Modified: branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp (original)
+++ branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Sun Aug 1 17:16:48 2010
@@ -214,11 +214,7 @@
(defconstant +lisp-object-array+ "[Lorg/armedbear/lisp/LispObject;")
(defconstant +closure-binding-array+ "[Lorg/armedbear/lisp/ClosureBinding;")
-(defconstant +lisp-fixnum-class+ "org/armedbear/lisp/Fixnum")
-(defconstant +lisp-fixnum+ "Lorg/armedbear/lisp/Fixnum;")
(defconstant +lisp-fixnum-array+ "[Lorg/armedbear/lisp/Fixnum;")
-(defconstant +lisp-bignum-class+ "org/armedbear/lisp/Bignum")
-(defconstant +lisp-bignum+ "Lorg/armedbear/lisp/Bignum;")
(defconstant +lisp-single-float-class+ "org/armedbear/lisp/SingleFloat")
(defconstant +lisp-single-float+ "Lorg/armedbear/lisp/SingleFloat;")
(defconstant +lisp-double-float-class+ "org/armedbear/lisp/DoubleFloat")
@@ -766,7 +762,7 @@
(CHARACTER +lisp-character+)
(CONS +lisp-cons+)
(HASH-TABLE +lisp-hash-table+)
- (FIXNUM +lisp-fixnum-class+)
+ (FIXNUM +lisp-fixnum+)
(STREAM +lisp-stream+)
(STRING +lisp-abstract-string+)
(VECTOR +lisp-abstract-vector+)))
@@ -917,15 +913,15 @@
(defun emit-unbox-fixnum ()
(declare (optimize speed))
(cond ((= *safety* 3)
- (emit-invokestatic +lisp-fixnum-class+ "getValue"
+ (emit-invokestatic +lisp-fixnum+ "getValue"
(lisp-object-arg-types 1) "I"))
(t
- (emit 'checkcast +lisp-fixnum-class+)
- (emit 'getfield +lisp-fixnum-class+ "value" "I"))))
+ (emit 'checkcast +lisp-fixnum+)
+ (emit 'getfield +lisp-fixnum+ "value" "I"))))
(defknown emit-unbox-long () t)
(defun emit-unbox-long ()
- (emit-invokestatic +lisp-bignum-class+ "longValue"
+ (emit-invokestatic +lisp-bignum+ "longValue"
(lisp-object-arg-types 1) "J"))
(defknown emit-unbox-float () t)
@@ -956,8 +952,8 @@
((eq required-representation :int)
(cond ((and (fixnum-type-p derived-type)
(< *safety* 3))
- (emit 'checkcast +lisp-fixnum-class+)
- (emit 'getfield +lisp-fixnum-class+ "value" "I"))
+ (emit 'checkcast +lisp-fixnum+)
+ (emit 'getfield +lisp-fixnum+ "value" "I"))
(t
(emit-invokevirtual +lisp-object+ "intValue" nil "I"))))
((eq required-representation :char)
@@ -2042,23 +2038,23 @@
(defun serialize-integer (n)
"Generates code to restore a serialized integer."
(cond((<= 0 n 255)
- (emit-getstatic +lisp-fixnum-class+ "constants" +lisp-fixnum-array+)
+ (emit-getstatic +lisp-fixnum+ "constants" +lisp-fixnum-array+)
(emit-push-constant-int n)
(emit 'aaload))
((<= most-negative-fixnum n most-positive-fixnum)
(emit-push-constant-int n)
- (emit-invokestatic +lisp-fixnum-class+ "getInstance"
+ (emit-invokestatic +lisp-fixnum+ "getInstance"
'("I") +lisp-fixnum+))
((<= most-negative-java-long n most-positive-java-long)
(emit-push-constant-long n)
- (emit-invokestatic +lisp-bignum-class+ "getInstance"
+ (emit-invokestatic +lisp-bignum+ "getInstance"
'("J") +lisp-integer+))
(t
(let* ((*print-base* 10)
(s (with-output-to-string (stream) (dump-form n stream))))
(emit 'ldc (pool-string s))
(emit-push-constant-int 10)
- (emit-invokestatic +lisp-bignum-class+ "getInstance"
+ (emit-invokestatic +lisp-bignum+ "getInstance"
(list +java-string+ "I") +lisp-integer+)))))
(defun serialize-character (c)
@@ -3384,7 +3380,7 @@
'ifne)
(defun p2-test-fixnump (form)
- (p2-test-instanceof-predicate form +lisp-fixnum-class+))
+ (p2-test-instanceof-predicate form +lisp-fixnum+))
(defun p2-test-stringp (form)
(p2-test-instanceof-predicate form +lisp-abstract-string+))
@@ -4607,7 +4603,7 @@
(p2-instanceof-predicate form target representation +lisp-cons+))
(defun p2-fixnump (form target representation)
- (p2-instanceof-predicate form target representation +lisp-fixnum-class+))
+ (p2-instanceof-predicate form target representation +lisp-fixnum+))
(defun p2-packagep (form target representation)
(p2-instanceof-predicate form target representation +lisp-package+))
@@ -7435,7 +7431,7 @@
(CHARACTER +lisp-character+)
(CONS +lisp-cons+)
(HASH-TABLE +lisp-hash-table+)
- (FIXNUM +lisp-fixnum-class+)
+ (FIXNUM +lisp-fixnum+)
(STREAM +lisp-stream+)
(STRING +lisp-abstract-string+)
(VECTOR +lisp-abstract-vector+)))
Modified: branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp
==============================================================================
--- branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp (original)
+++ branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp Sun Aug 1 17:16:48 2010
@@ -113,8 +113,8 @@
(define-class-name +lisp-thread+ "org.armedbear.lisp.LispThread")
(define-class-name +lisp-closure-binding+ "org.armedbear.lisp.ClosureBinding")
(define-class-name +lisp-integer+ "org.armedbear.lisp.LispInteger")
-(define-class-name +!lisp-fixnum+ "org.armedbear.lisp.Fixnum")
-(define-class-name +!lisp-bignum+ "org.armedbear.lisp.Bignum")
+(define-class-name +lisp-fixnum+ "org.armedbear.lisp.Fixnum")
+(define-class-name +lisp-bignum+ "org.armedbear.lisp.Bignum")
(define-class-name +!lisp-single-float+ "org.armedbear.lisp.SingleFloat")
(define-class-name +!lisp-double-float+ "org.armedbear.lisp.DoubleFloat")
(define-class-name +lisp-cons+ "org.armedbear.lisp.Cons")
More information about the armedbear-cvs
mailing list