Details
Description
In "Approaches to Reflective Method Invocation" to be presented at ICOOOLPS 2008, we show 4 ways to implement method reflection:
1) out-of-line machine code - what we currently have
2) opt compiler simplification of out-of-line - simplifying a out-of-line call to a regular call when the method argument is constant
3) bytecode generation upon initial reflect method/constructor object creation - create bytecode to perform the reflective method call when a reflective wrapper is created
4) deferred bytecode generation - as with 3, but create bytecode upon 1st reflective method invocation
Of the approaches 3 gives the greatest time saving, as it speeds eclipse up considerably. The best average performance is given by 4.
Schemes 3 and 4 require an extra class to work, putting pressure on the JTOC. However, they are able to speed both baseline and opt compiled code.
We should implement scheme 4 in the current trunk.
Issue Links
- relates to
-
RVM-443
Avoid back references in java.lang.reflect VMXXX classes
-
I think it might make sense to implement on a branch first then merge in after a chance for comments. I've read the paper, but have some questions about how the mechanism actually works (for example when the arguments to invoke aren't immediately obvious String constants) that I think would be clarified by seeing the code.