Node child/children relation change during Runtime

Gero Leinemann gero.leinemann at oracle.com
Tue Jul 15 12:12:53 UTC 2014


Hello everyone,

I'm new to Graal/Truffle and currently working for Michael Haupt on
FastR. While trying to understand the FastR code base I've got some
questions regarding the creation and mutation of child/children of a
Truffle-Node.

As far as I understand it, the aim in language implementations using
Truffle is to keep the AST stable to get it compiled some time by Graal.
Therefore one should avoid adding new children during the lifetime of a
Node, as this alters the AST.

Now there is a piece of code where a Node is once added to the tree
whose children's order is permuted frequently (every 'execute'). My
questions are:
1) Does this count as alteration?
2) If no: Is the change of order of children during execution really
irrelevant for Truffle/Graal?
3) If no: Is the only thing Truffle/Graal depends on for compilation the
proper bidirectional parent <-> child relation which is established by
'Node.insert'/'replace'?

Thank you in advance!

Best Regards,
Gero


More information about the graal-dev mailing list