Hard Crash on OS X and Linux (but somewhat environment dependent)

Andreas Woess andreas.woess at jku.at
Wed Dec 10 16:09:49 UTC 2014


Hi Stefan,

yes, it's best to get rid of all usages of unsafeCast; it's going to be
deprecated/removed anyway as we're striving for a safe Truffle API.
There shouldn't be any major performance impact from removing it.

- andreas

On 10/12/14 16:56, Stefan Marr wrote:
> Hi Gilles:
>
>> On 10 Dec 2014, at 16:42, Gilles Duboscq <duboscq at ssw.jku.at> wrote:
>>
>> If you know that all path reaching this are dominated by some specific
>> check, you can use it as the condition such that the information from
>> this cast will only ever be used in those branches.
> Hm, well, there is no check. A Smalltalk method never has a lexical scope, and will thus never try to access the context field.
> A Smalltalk block has a lexical scope, and might access it, but it is _always_ guaranteed to have the context frame there.
> That’s what I am trying to say with the unsafeCast.
> On top of that, `context` is a final field. There is just nothing to check at runtime.
>
> At least, I don’t really see what I could check… 
>
>> In general, we're planning to remove the unsafe operations from
>> CompilerDirectives anyway.
> Ok, so, your suggestions would be to just get rid of all usages of CompilerDirectives already?
>
>
> Thanks
> Stefan
>



More information about the graal-dev mailing list