[armedbear-devel] [armedbear-cvs] r11589 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuels at gmail.com
Mon Jan 26 12:18:59 UTC 2009


Since several commits have trickled through which implement bits of
what I'm doing, I thought it'd be a good idea to describe the outline
of what's still to come. That makes it easier to judge the merits of
the current commits too.

The final goal of much of this is to start using the 'float' and
'double' JVM built-in types for floating point calculations whenever
possible.

The implementation of the above basically means:

 - The introduction of 2 new representations (:float and :double) -
next to the three existing ones: NIL, :int and :long
 - Because of the number of representations, it's no longer viable to
enumerate all possible representations separately (see the current
implementation of p2-plus/p2-minus for what I mean: they have code
special handling :int and :long representations)
 - Representation conversion becomes a bit tedious too: there will be
5 possible states, meaning we need a set of general purpose
representation conversion routines
 - Adding additional opcodes (of which the commit below is an example)
 - Make 'SINGLE-FLOAT and 'DOUBLE-FLOAT supported compiler types
 - Extend type derivation routines to recognise 'single-float and
'double-float types


Most of the above is in my working copy at home, for the case to
implement p2-times, p2-plus and p2-minus with support for single and
double float types.

Over the next days, I hope to commit the content of my working copy in
logical and coherent bits, instead of dumping all of the above on your
heads :-)

The above is mostly informative, but should you have any questions,
please feel free to ask!


Bye,


Erik.


On Mon, Jan 26, 2009 at 12:33 AM, Erik Huelsmann
<ehuelsmann at common-lisp.net> wrote:
> Author: ehuelsmann
> Date: Sun Jan 25 23:33:01 2009
> New Revision: 11589
>
> Log:
> Add stack information for opcodes we'll start using soon.
>
> Modified:
>   trunk/abcl/src/org/armedbear/lisp/opcodes.lisp
>
> Modified: trunk/abcl/src/org/armedbear/lisp/opcodes.lisp
> ==============================================================================
> --- trunk/abcl/src/org/armedbear/lisp/opcodes.lisp      (original)
> +++ trunk/abcl/src/org/armedbear/lisp/opcodes.lisp      Sun Jan 25 23:33:01 2009
> @@ -150,16 +150,16 @@
>  (define-opcode swap 95 1 0)
>  (define-opcode iadd 96 1 -1)
>  (define-opcode ladd 97 1 -2)
> -(define-opcode fadd 98 1 nil)
> -(define-opcode dadd 99 1 nil)
> +(define-opcode fadd 98 1 -1)
> +(define-opcode dadd 99 1 -2)
>  (define-opcode isub 100 1 -1)
>  (define-opcode lsub 101 1 -2)
>  (define-opcode fsub 102 1 nil)
>  (define-opcode dsub 103 1 nil)
>  (define-opcode imul 104 1 -1)
>  (define-opcode lmul 105 1 -2)
> -(define-opcode fmul 106 1 nil)
> -(define-opcode dmul 107 1 nil)
> +(define-opcode fmul 106 1 -1)
> +(define-opcode dmul 107 1 -2)
>  (define-opcode idiv 108 1 nil)
>  (define-opcode ldiv 109 1 nil)
>  (define-opcode fdiv 110 1 nil)
> @@ -186,14 +186,14 @@
>  (define-opcode lxor 131 1 -2)
>  (define-opcode iinc 132 3 0)
>  (define-opcode i2l 133 1 1)
> -(define-opcode i2f 134 1 nil)
> -(define-opcode i2d 135 1 nil)
> +(define-opcode i2f 134 1 0)
> +(define-opcode i2d 135 1 1)
>  (define-opcode l2i 136 1 -1)
>  (define-opcode l2f 137 1 nil)
> -(define-opcode l2d 138 1 nil)
> +(define-opcode l2d 138 1 0)
>  (define-opcode f2i 139 1 nil)
>  (define-opcode f2l 140 1 nil)
> -(define-opcode f2d 141 1 nil)
> +(define-opcode f2d 141 1 1)
>  (define-opcode d2i 142 1 nil)
>  (define-opcode d2l 143 1 nil)
>  (define-opcode d2f 144 1 nil)
>
> _______________________________________________
> armedbear-cvs mailing list
> armedbear-cvs at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-cvs
>




More information about the armedbear-devel mailing list