Currently the patten:
... Method { ...
Method(..) { vmMethod = new VMMethod(...); vmMethod.method = this; }
}
... VMMethod { ...
Method method;
... invoke ... {
method.isAccessible(...)
..
}
}
is common in java.lang.reflect. The field holding the Method is non-final therefore we can't optimize the back reference away. It would be much more efficient if when calling VMMethod.invoke the Method was passed as an additional argument.
This effects Constructor too.
Patch in r14905.