CompilerDirectives unsafeGet/Put and location identity

Stefan Marr java at stefan-marr.de
Mon Apr 28 15:18:25 UTC 2014


Hi:

On 25 Apr 2014, at 19:35, Tom Rodriguez <tom.rodriguez at oracle.com> wrote:

> If you have a piece of metadata that represents a logical field in a type that can be used for the identity.  That’s what’s done for Java.  A ResolvedJavaField represents a field declared by a particular class and that object serves as it’s identity.  Arrays are handled specially.  A very quick hack could use a Map keyed by fieldOffset to return a shared object.  You’d get aliasing between types at the same offset but it’s better than ANY_LOCATION.

Since the object layout is fixed, and nothing funky or ‘variable’ is going on in that little Smalltalk, I tried with an array of simple marker objects for the location ids. But the result was still that I was running into correctness issues with the compiled code.
For the moment, I take it as the compiler problems Andreas referred to, and continue to pass null.

Thanks for all the explanations!
That helped to understand the terse comments in the code :)

Best regards
Stefan


-- 
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/





More information about the graal-dev mailing list