Changeset 12846


Ignore:
Timestamp:
08/01/10 21:31:06 (11 years ago)
Author:
ehuelsmann
Message:

Continued integration of CLASS-NAME: use it for
+lisp-single-float+ and +lisp-double-float+.

Location:
branches/generic-class-file/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12845 r12846  
    216216(defconstant +closure-binding-array+ "[Lorg/armedbear/lisp/ClosureBinding;")
    217217(defconstant +lisp-fixnum-array+ "[Lorg/armedbear/lisp/Fixnum;")
    218 (defconstant +lisp-single-float-class+ "org/armedbear/lisp/SingleFloat")
    219 (defconstant +lisp-single-float+ "Lorg/armedbear/lisp/SingleFloat;")
    220 (defconstant +lisp-double-float-class+ "org/armedbear/lisp/DoubleFloat")
    221 (defconstant +lisp-double-float+ "Lorg/armedbear/lisp/DoubleFloat;")
    222218(defconstant +lisp-character-array+ "[Lorg/armedbear/lisp/LispCharacter;")
    223219(defconstant +lisp-closure-parameter-array+ "[Lorg/armedbear/lisp/Closure$Parameter;")
     
    639635    (:int     . ,+lisp-integer+)
    640636    (:long    . ,+lisp-integer+)
    641     (:float   . ,+!lisp-single-float+)
    642     (:double  . ,+!lisp-double-float+))
     637    (:float   . ,+lisp-single-float+)
     638    (:double  . ,+lisp-double-float+))
    643639  "Lists the class on which to call the `getInstance' method on,
    644640when converting the internal representation to a LispObject.")
     
    929925  (declare (optimize speed))
    930926  (cond ((= *safety* 3)
    931          (emit-invokestatic +lisp-single-float-class+ "getValue"
     927         (emit-invokestatic +lisp-single-float+ "getValue"
    932928                            (lisp-object-arg-types 1) "F"))
    933929        (t
    934          (emit 'checkcast +lisp-single-float-class+)
    935          (emit 'getfield +lisp-single-float-class+ "value" "F"))))
     930         (emit 'checkcast +lisp-single-float+)
     931         (emit 'getfield +lisp-single-float+ "value" "F"))))
    936932
    937933(defknown emit-unbox-double () t)
     
    939935  (declare (optimize speed))
    940936  (cond ((= *safety* 3)
    941          (emit-invokestatic +lisp-double-float-class+ "getValue"
     937         (emit-invokestatic +lisp-double-float+ "getValue"
    942938                            (lisp-object-arg-types 1) "D"))
    943939        (t
    944          (emit 'checkcast +lisp-double-float-class+)
    945          (emit 'getfield +lisp-double-float-class+ "value" "D"))))
     940         (emit 'checkcast +lisp-double-float+)
     941         (emit 'getfield +lisp-double-float+ "value" "D"))))
    946942
    947943(defknown fix-boxing (t t) t)
     
    20662062(defun serialize-float (s)
    20672063  "Generates code to restore a serialized single-float."
    2068   (emit 'new +lisp-single-float-class+)
     2064  (emit 'new +lisp-single-float+)
    20692065  (emit 'dup)
    20702066  (emit 'ldc (pool-float s))
    2071   (emit-invokespecial-init +lisp-single-float-class+ '("F")))
     2067  (emit-invokespecial-init +lisp-single-float+ '("F")))
    20722068
    20732069(defun serialize-double (d)
    20742070  "Generates code to restore a serialized double-float."
    2075   (emit 'new +lisp-double-float-class+)
     2071  (emit 'new +lisp-double-float+)
    20762072  (emit 'dup)
    20772073  (emit 'ldc2_w (pool-double d))
    2078   (emit-invokespecial-init +lisp-double-float-class+ '("D")))
     2074  (emit-invokespecial-init +lisp-double-float+ '("D")))
    20792075
    20802076(defun serialize-string (string)
     
    21282124  `((integer "INT" ,#'eql ,#'serialize-integer ,+lisp-integer+)
    21292125    (character "CHR" ,#'eql ,#'serialize-character ,+lisp-character+)
    2130     (single-float "FLT" ,#'eql ,#'serialize-float ,+!lisp-single-float+)
    2131     (double-float "DBL" ,#'eql ,#'serialize-double ,+!lisp-double-float+)
     2126    (single-float "FLT" ,#'eql ,#'serialize-float ,+lisp-single-float+)
     2127    (double-float "DBL" ,#'eql ,#'serialize-double ,+lisp-double-float+)
    21322128    (string "STR" ,#'equal ,#'serialize-string
    21332129            ,+lisp-abstract-string+) ;; because of (not compile-file)
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

    r12845 r12846  
    116116(define-class-name +lisp-fixnum+ "org.armedbear.lisp.Fixnum")
    117117(define-class-name +lisp-bignum+ "org.armedbear.lisp.Bignum")
    118 (define-class-name +!lisp-single-float+ "org.armedbear.lisp.SingleFloat")
    119 (define-class-name +!lisp-double-float+ "org.armedbear.lisp.DoubleFloat")
     118(define-class-name +lisp-single-float+ "org.armedbear.lisp.SingleFloat")
     119(define-class-name +lisp-double-float+ "org.armedbear.lisp.DoubleFloat")
    120120(define-class-name +lisp-cons+ "org.armedbear.lisp.Cons")
    121121(define-class-name +lisp-load+ "org.armedbear.lisp.Load")
Note: See TracChangeset for help on using the changeset viewer.