MethodHandles for Kawa and other functional languages?

Helmut Eller eller.helmut at gmail.com
Thu Sep 30 07:03:10 PDT 2010


* Alessio Stalla [2010-09-30 13:28] writes:

>> I guess you could avoid reflection if you generate a custom bootstrap
>> method for each callsite.  Hmm.. probably just as clumsy as reflection.
>
> Yeah, clumsy and suffering from code bloat - I'm already disturbed to
> have one static block registering the bootstrap method

I think with the new fancy constants you can put the bootstrap
method(handle) in the constant pool and the invokedynamic instruction
refers to the constant pool; no registering required.

> for each class (i.e. per compiled function).  I'd have much preferred
> if bootstrap method registration were inheritable.

Can't you put many lisp functions in one class file?  At least for
non-closure functions that seems possible.

> But that aside, after all
> reflection will only be used the very first time the callsite is
> linked, so it shouldn't be much of a problem.

Reflection is never cheap, at least according to folk wisdom.

Helmut



More information about the mlvm-dev mailing list