CompilerDirectives unsafeGet/Put and location identity

Andreas Woess andreas.woess at
Fri Apr 25 18:24:11 UTC 2014

Hi Stefan,

Short answer: we indeed have a compiler problem with Truffle's 
unsafeGet* methods in combination with a few optimizations at the 
moment. It's better to always pass false as the condition parameter for 
now (the condition shouldn't be true here anyway). If that does not 
solve the problem, it's likely an issue of location identity used 
incorrectly (see Tom's reply) -- location identity null is on the safe side.

- andreas

On 25/04/14 18:16, Stefan Marr wrote:
> Hi:
> How is the location identity supposed to be used for unsafe access operations in the CompilerDirectives?
> I saw that Wei changed ZipPy’s use of these methods from passing the node identity to passing null [1].
> The commit messages mentions a ‘compiler error’.
> For TruffleSOM, this introduced a correctness issue earlier this month (see the mail here [2]).
> Passing null indeed also solvers my correctness issues, but I still would like to understand whether that’s a compiler bug that is going to be fixed, or whether I used [3] the location hint in a way that it wasn’t supposed to be used.
> Thanks
> Stefan
> [1]
> [2]
> [3]

More information about the graal-dev mailing list