Visiting Nodes
christian.humer at gmail.com
christian.humer at gmail.com
Fri May 1 19:45:39 UTC 2015
Hi Guido,
Node#accept is final because we want to guarantee that all nodes
annotated with @Child and @Children are visited. Can you give me some
more details on your use-case? Adding or replacing nodes can be done
using the Node#replace and Node#insert methods.
- Christian Humer
------ Original Message ------
From: "Guido Chari" <charig at gmail.com>
To: graal-dev at openjdk.java.net
Sent: 01.05.2015 17:17:54
Subject: Visiting Nodes
>Hi,
>
>I am extending TruffleSOM and i need a post-processing over the AST. I
>would like to implement a visitor that add nodes with my particular
>behavior after compilation. But then i realized the accept method on
>Node
>is declared as final. Wouldn't it be better to allow subclassing the
>accept?
>
>Best,
>Guido.
More information about the graal-dev
mailing list