Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java @ 19710:48eeda5dfdbf
Move linking of RootNode to CallTarget to ensure final semantics.
* "this" was published before complete initialization by being in the constructor.
* Make the constructor protected where possible.
author | Benoit Daloze <benoit.daloze@jku.at> |
---|---|
date | Fri, 06 Mar 2015 18:51:31 +0100 |
parents | e3c95cbbb50c |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java Thu Mar 05 14:19:23 2015 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java Fri Mar 06 18:51:31 2015 +0100 @@ -36,11 +36,10 @@ private final RootNode rootNode; - public DefaultCallTarget(RootNode function) { + protected DefaultCallTarget(RootNode function) { this.rootNode = function; this.rootNode.adoptChildren(); this.rootNode.applyInstrumentation(); - this.rootNode.setCallTarget(this); } @Override