Getting ciObject from oop/jobject
rednaxelafx at gmail.com
Thu Aug 1 06:16:14 PDT 2013
This topic is related to HotSpot Server Compiler instead of the Java core
library, so I'm cc'ing this email to hotspot-compiler-dev and dropping
As you already know, HotSpot compilers are shielded from VM runtime
implementation details via the Compiler Interface (CI). That's why you
shouldn't be getting raw oops in C2 code.
Where are you getting the oopInstance from? If it can be found from some
known "roots", e.g. "well-known classes", fields of "well-known classes",
or the holder class of the method to be compiled, etc., then it's already
available through CI.
On Thu, Aug 1, 2013 at 3:17 AM, Nick Williams <
nicholas+openjdk at nicholaswilliams.net> wrote:
> In native code (library_call.cpp), if I have an oop (which I can convert
> to a jobject if need be), how do I get a ciObject? I see that ciEnv has a
> ciObject* get_object(oop) method, but it's private. And ciObjectFactory has
> a ciObject* get(oop) method, but I can't figure out how to get the
> ciObjectFactory instance.
> I know that ciObject keeps a jobject internally, and I know that ciObject
> has a ciObject(oop) constructor, but it's protected (for good reason).
> If it helps, I'm trying to inline a method and need to
> set_result(makecon(TypeInstPtr::make(oopInstance))). I may be going down
> the wrong path.
> Thanks in advance for any help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev