Potential Graal Regression: The location argument could not be resolved to a constant.
Andreas Woess
andreas.woess at jku.at
Tue May 27 21:35:02 UTC 2014
On 2014-05-27 22:27, Stefan Marr wrote:
> Hi Gilles,
> Hi Chris:
>
> On 27 May 2014, at 16:05, Gilles Duboscq <duboscq at ssw.jku.at> wrote:
>
>> The separate issue of the BlockNodeWithContext inside SBlock remains though.
> Gilles, thanks for having a look. That helps a lot. Now I have an idea in which direction to look.
>
> And that brings me to my next question, Chris:
>
> In BlockNodeWithContext, I access the outer ‘self’ slot, which I need to traverse the chain of lexical contexts.
> In TruffleSOM, all arguments of method calls are directly copied into the frame objects to enable specialization via FrameSlots (see ArgumentInitializationNode and its usage). After that, I never access the arguments array anymore.
>
> To get access to the self slot in that design, I keep a reference to the corresponding node in the block object.
> Previously, I had the reference directly to the frame slot object, but that gave already issues because then it was not constant.
> Guess, changing the reference to the node was just hiding the problem, without solving it.
Exactly.
> Chris, a brief look at the Ruby implementation makes me belief that you do not do that for accessing the lexical chain.
> You are using the arguments array directly via RubyArguments.getDeclarationFrame(). Is that to avoid exactly the issue I got here?
>
> At the moment, I guess that’s the only solution that avoids the need of having access to the frame slot object.
I take it that you always have a self slot (and it's always the first)?
In that case you could share the same FrameSlot instance across all
methods by shallowCopy()-ing a FrameDescriptor with only the self slot
and then adding your other slots to the copy.
Accessing the arguments directly also avoids the issue (iff 'self'
cannot be changed).
- andreas
More information about the graal-dev
mailing list