Truffle: share frame descriptor among cloned call targets

Andreas Woess andreas.woess at jku.at
Wed Oct 29 16:13:13 UTC 2014


Short answer: because it could break code in a few cases.

A shallowCopy() isn't really that useful anyway, since it also shares 
existing FrameSlot instances and thus also the FrameSlotKinds. You can 
still do a full copy by overriding the copy() method. We don't do this 
because it requires any nodes referencing FrameSlots to be updated which 
is hard to do reliably in the framework.
I've recently experimented with making this unnecessary, but I can't say 
yet whether this is going to happen.

- andreas

On 28/10/14 08:51, Stefan Marr wrote:
> Hi Andreas:
>
> Could you elaborate a little on this change?
>
>> On 28 Oct 2014, at 03:00, doug.simon at oracle.com wrote:
>>
>> Changeset: be1316e633b5
>> Author:    Andreas Woess <andreas.woess at jku.at>
>> Date:      2014-10-27 14:33 +0100
>> URL:       http://hg.openjdk.java.net/graal/graal/rev/be1316e633b5
>>
>> Truffle: share frame descriptor among cloned call targets
>>
>> ! graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java
> I thought the idea was that the cloned AST trees can specialize themselves completely independently. Also with regard to the types in the frames. So, in TruffleSOM I am also making sure to clone the frame slots properly and clone all lexically embedded methods to have a proper match of descriptors and slot objects.
>
> Is all this not necessary anymore?
>
> Best regards
> Stefan
>



More information about the graal-dev mailing list