We're updating the issue view to help you get more done. 

Avoid back references in java.lang.reflect VMXXX classes

Description

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.

Environment

Status

Assignee

Ian Rogers

Reporter

Ian Rogers

Fix versions

Priority

Medium