Virtual extension methods -- second draft
Brian Goetz
brian.goetz at oracle.com
Tue Jun 8 09:04:57 PDT 2010
> 8: I see two problems with the invokedynamic approach.
> invokedynamic is a callsite resolution but here all call sites will be
> resolved in the same way,
> so using invokedynamic is a waste of CPU cycles.
Correct. There are several approaches here that use indy. One of them
involves weaving an indy site into the class implementing the extended
interface, which means the resolution is only done once. And in the case
where we do indy weaving at the client call site it is of course possible for
the bootstrap to cache the resolution for classes it already knows about.
> You need a way to transfer the information stored from the bytecode
> attribute of
> the defender method to the bootstrap method.
Correct. The most likely mechanism here is to extend reflection to do that.
More information about the lambda-dev
mailing list