Lambdas and serialization
Fredrik Öhrström
oehrstroem at gmail.com
Wed Oct 20 10:21:00 PDT 2010
2010/10/20w Rémi Forax <forax at univ-mlv.fr>
> Method handle can not be easily serializable because they don't hold
> information like the declaring class,
> the method name. They are typically represented by a pointer or a base
> pointer and a vtable slot.
> They are more close to the VM and less close to the language.
>
Hmm, it must be possible to deduce that a certain methodhandle keeps
a certain target class alive. If not, bad things can happen after GC.
For example, the target class that owns an immediate target address
can be found using the meta data; a virtual method handle has the
target class as the first argument in the MethodType; a bound method
handle has a pointer to an instance of the target class.
//Fredrik
More information about the lambda-dev
mailing list