# HG changeset patch # User Roland Schatz # Date 1367505159 -7200 # Node ID 3fdbe6a681034f712f005ba2f736cd6e2a33c99f # Parent 688219709f7bea4ca79d815143ad031c0b4a4937 Pass fixed node into getMaterializedRepresentation. diff -r 688219709f7b -r 3fdbe6a68103 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualArrayNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualArrayNode.java Thu May 02 16:31:44 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualArrayNode.java Thu May 02 16:32:39 2013 +0200 @@ -140,7 +140,7 @@ } @Override - public AllocatedObjectNode getMaterializedRepresentation(ValueNode[] entries, int[] locks) { + public AllocatedObjectNode getMaterializedRepresentation(FixedNode fixed, ValueNode[] entries, int[] locks) { return new AllocatedObjectNode(this); } } diff -r 688219709f7b -r 3fdbe6a68103 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualBoxingNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualBoxingNode.java Thu May 02 16:31:44 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualBoxingNode.java Thu May 02 16:32:39 2013 +0200 @@ -46,7 +46,7 @@ } @Override - public ValueNode getMaterializedRepresentation(ValueNode[] entries, int[] locks) { + public ValueNode getMaterializedRepresentation(FixedNode fixed, ValueNode[] entries, int[] locks) { assert entries.length == 1; assert locks.length == 0; return new BoxNode(entries[0], type(), boxingKind); diff -r 688219709f7b -r 3fdbe6a68103 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualInstanceNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualInstanceNode.java Thu May 02 16:31:44 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualInstanceNode.java Thu May 02 16:32:39 2013 +0200 @@ -96,7 +96,7 @@ } @Override - public ValueNode getMaterializedRepresentation(ValueNode[] entries, int[] locks) { + public ValueNode getMaterializedRepresentation(FixedNode fixed, ValueNode[] entries, int[] locks) { return new AllocatedObjectNode(this); } } diff -r 688219709f7b -r 3fdbe6a68103 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java Thu May 02 16:31:44 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/virtual/VirtualObjectNode.java Thu May 02 16:32:39 2013 +0200 @@ -80,7 +80,7 @@ * {@link AllocatedObjectNode} then this node will be attached to a {@link CommitAllocationNode} * , otherwise the node will just be added to the graph. */ - public abstract ValueNode getMaterializedRepresentation(ValueNode[] entries, int[] locks); + public abstract ValueNode getMaterializedRepresentation(FixedNode fixed, ValueNode[] entries, int[] locks); @Override public void generate(LIRGeneratorTool gen) { diff -r 688219709f7b -r 3fdbe6a68103 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/BlockState.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/BlockState.java Thu May 02 16:31:44 2013 +0200 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/BlockState.java Thu May 02 16:32:39 2013 +0200 @@ -152,17 +152,18 @@ List values = new ArrayList<>(8); List locks = new ArrayList<>(2); List otherAllocations = new ArrayList<>(2); - materializeWithCommit(virtual, objects, locks, values, otherAllocations, state); + materializeWithCommit(fixed, virtual, objects, locks, values, otherAllocations, state); materializeEffects.addMaterializationBefore(fixed, objects, locks, values, otherAllocations); } - private void materializeWithCommit(VirtualObjectNode virtual, List objects, List locks, List values, List otherAllocations, EscapeState state) { + private void materializeWithCommit(FixedNode fixed, VirtualObjectNode virtual, List objects, List locks, List values, List otherAllocations, + EscapeState state) { trace("materializing %s", virtual); ObjectState obj = getObjectState(virtual); ValueNode[] entries = obj.getEntries(); - ValueNode representation = virtual.getMaterializedRepresentation(entries, obj.getLocks()); + ValueNode representation = virtual.getMaterializedRepresentation(fixed, entries, obj.getLocks()); obj.escape(representation, state); if (representation instanceof AllocatedObjectNode) { objects.add((AllocatedObjectNode) representation); @@ -175,7 +176,7 @@ ObjectState entryObj = getObjectState(entries[i]); if (entryObj != null) { if (entryObj.isVirtual()) { - materializeWithCommit(entryObj.getVirtualObject(), objects, locks, values, otherAllocations, state); + materializeWithCommit(fixed, entryObj.getVirtualObject(), objects, locks, values, otherAllocations, state); } values.set(pos + i, entryObj.getMaterializedValue()); } else {