optional arguments for bootstrap methods
john.r.rose at Oracle.COM
Fri Oct 22 04:14:06 PDT 2010
On Oct 22, 2010, at 4:03 AM, Helmut Eller wrote:
> Why is the name a required and not an optional argument?
The name is part of the fixed structure of CONSTANT_InvokeDynamic, which is modeled on CONSTANT_Methodref, and therefore contains a CONSTANT_NameAndType. Whether you want the name or not, it's in there.
Minimally, an indy instruction could get by with a signature, a BSM, and 0 or more static arguments. Adding the name makes the new CP entry a little more similar to existing ones.
If you put the name string in the argv, you'd need a CONSTANT_Utf8 and a CONSTANT_String. In the current design, you instead have a CONSTANT_NameAndType and a CONSTANT_Utf8. So the CP entry pressure is the same in most cases.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlvm-dev