Mercurial > hg > graal-compiler
changeset 16254:a56aabb15e98
new constructor (with stateAfter) for StoreFieldNode
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 26 Jun 2014 16:27:36 +0200 |
parents | 614d3b9ed188 |
children | e6919996abe9 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Thu Jun 26 16:27:36 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnsafeStoreNode.java Thu Jun 26 16:27:36 2014 +0200 @@ -103,14 +103,12 @@ @Override protected ValueNode cloneAsFieldAccess(ResolvedJavaField field) { - StoreFieldNode storeFieldNode = graph().add(new StoreFieldNode(object(), field, value())); - storeFieldNode.setStateAfter(stateAfter()); - return storeFieldNode; + return new StoreFieldNode(object(), field, value(), stateAfter()); } @Override protected ValueNode cloneAsArrayAccess(ValueNode location, LocationIdentity identity) { - return this.graph().add(new UnsafeStoreNode(object(), location, value, accessKind(), identity)); + return new UnsafeStoreNode(object(), location, value, accessKind(), identity); } public FrameState getState() {
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java Thu Jun 26 16:27:36 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/StoreFieldNode.java Thu Jun 26 16:27:36 2014 +0200 @@ -68,6 +68,12 @@ this.value = value; } + public StoreFieldNode(ValueNode object, ResolvedJavaField field, ValueNode value, FrameState stateAfter) { + super(StampFactory.forVoid(), object, field); + this.value = value; + this.stateAfter = stateAfter; + } + @Override public void virtualize(VirtualizerTool tool) { State state = tool.getObjectState(object());