instanceof klass "constant"

Christian Thalinger christian.thalinger at oracle.com
Thu Oct 24 17:55:32 PDT 2013


On Oct 24, 2013, at 3:05 PM, Deneau, Tom <tom.deneau at amd.com> wrote:

> We have some junit tests that test instanceof.
> 
> The code for these ends up loading from the klass ptr field of the object (offset 8) and comparing to a 64-bit "constant" klass value.  Is this constant something that can change with GC and then need to be fixed up?

No.  The value at offset 8 is one of:

    Klass*      _klass;
    narrowKlass _compressed_klass;

These don’t move (yet).  I say yet because I have no idea what the runtime team has in mind.

> 
> Currently we do handle similar cases like class references for static fields by using a JNI weak reference but is this something that falls in that category?
> 
> -- Tom



More information about the graal-dev mailing list