Accessing parameters from a methodHandle
vladimir.x.ivanov at oracle.com
Thu Nov 26 12:32:50 UTC 2015
Can you elaborate what problem are you trying to solve?
It sounds like you want to iterate over all parameters of a compiled
method in C2.
methodHandle is a Handle for Method* which an internal representation of
a Java method. It doesn't provide any way to extract actual argument
representation during compilation.
During parsing you can use GraphKit::method(), ciMethod::arg_size(), and
GraphKit::argument(int i) to operate on arguments of a method being
parsed. See opto/library_call.cpp for examples.
(BCC: hotspot-dev at openjdk.java.net)
On 11/26/15 3:22 PM, Manas Thakur wrote:
> Hello all,
> I would like to know how to access the parameter nodes (in sequence) from a methodHandle. I could find that in “opto/parse1.cpp”, “ParmNodes” are constructed by determining the “arg_size”. However, this variable doesn’t match the actual number of parameters passed to the corresponding Java method. Any suggestions?
More information about the hotspot-dev