[armedbear-devel] Using named classes for primitives

Tobias C. Rittweiler tcr at freebits.de
Wed Oct 21 09:03:26 UTC 2009


Alessio Stalla writes:

> > Combined with invokedynamic, Java6 becomes an even more so interesting
> > platform. Perhaps interesting enough to throw out backwards
> > compatibility...
>
> I haven't yet understood exactly what invokedynamic is; would it be
> helpful for abcl?

My understanding is based on 5 minutes reading about it, so take it with
a grain of salt. From my understanding, when using invokedynamic, code
is compiled to something like (transliterated to Lisp):

  (defun foo (x y)
    (declare (type t x y))
    (check-type x integer)
    (check-type y integer)
    (+ x y))

I.e. types are checked at run-time, but the code following the type
checks is compiled with the assumption of the type-checks. In the
example, the call to + may assume that X and Y are in fact integers, not
just any objects.

  -T.





More information about the armedbear-devel mailing list