# HG changeset patch # User Doug Simon # Date 1379534243 -7200 # Node ID 23d91654c363b2c05a52baad6f93d462fbb22a2f # Parent de32cc4379a4a05025d1fff6ef6e47daa17e28c2 completed renaming GuardsPhase to GuardsStage diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Wed Sep 18 21:57:23 2013 +0200 @@ -645,7 +645,7 @@ checkcastDynamicSnippets.lower(checkcastDynamicNode); } } else if (n instanceof UnsafeLoadNode) { - if (graph.getGuardsPhase().ordinal() > StructuredGraph.GuardsStage.FLOATING_GUARDS.ordinal()) { + if (graph.getGuardsStage().ordinal() > StructuredGraph.GuardsStage.FLOATING_GUARDS.ordinal()) { UnsafeLoadNode load = (UnsafeLoadNode) n; assert load.kind() != Kind.Illegal; boolean compressible = (!load.object().isNullConstant() && load.accessKind() == Kind.Object); @@ -685,7 +685,7 @@ WriteNode hub = createWriteHub(graph, wordKind, storeHub.getObject(), storeHub.getValue()); graph.replaceFixed(storeHub, hub); } else if (n instanceof CommitAllocationNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { CommitAllocationNode commit = (CommitAllocationNode) n; ValueNode[] allocations = new ValueNode[commit.getVirtualObjects().size()]; @@ -761,7 +761,7 @@ graph.removeFixed(commit); } } else if (n instanceof OSRStartNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { OSRStartNode osrStart = (OSRStartNode) n; StartNode newStart = graph.add(new StartNode()); LocalNode buffer = graph.unique(new LocalNode(0, StampFactory.forKind(wordKind()))); @@ -790,31 +790,31 @@ } else if (n instanceof CheckCastDynamicNode) { checkcastDynamicSnippets.lower((CheckCastDynamicNode) n); } else if (n instanceof InstanceOfNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { instanceofSnippets.lower((InstanceOfNode) n, tool); } } else if (n instanceof InstanceOfDynamicNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { instanceofSnippets.lower((InstanceOfDynamicNode) n, tool); } } else if (n instanceof NewInstanceNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA) { newObjectSnippets.lower((NewInstanceNode) n); } } else if (n instanceof NewArrayNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA) { newObjectSnippets.lower((NewArrayNode) n); } } else if (n instanceof DynamicNewArrayNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA) { newObjectSnippets.lower((DynamicNewArrayNode) n); } } else if (n instanceof MonitorEnterNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { monitorSnippets.lower((MonitorEnterNode) n, tool); } } else if (n instanceof MonitorExitNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { monitorSnippets.lower((MonitorExitNode) n, tool); } } else if (n instanceof G1PreWriteBarrier) { @@ -832,7 +832,7 @@ } else if (n instanceof G1ArrayRangePostWriteBarrier) { writeBarrierSnippets.lower((G1ArrayRangePostWriteBarrier) n, tool); } else if (n instanceof NewMultiArrayNode) { - if (graph.getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA) { + if (graph.getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA) { newObjectSnippets.lower((NewMultiArrayNode) n); } } else if (n instanceof LoadExceptionObjectNode) { @@ -851,7 +851,7 @@ } private static boolean addReadBarrier(UnsafeLoadNode load) { - if (useG1GC() && load.graph().getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS && load.object().kind() == Kind.Object && load.accessKind() == Kind.Object && + if (useG1GC() && load.graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS && load.object().kind() == Kind.Object && load.accessKind() == Kind.Object && !ObjectStamp.isObjectAlwaysNull(load.object())) { ResolvedJavaType type = ObjectStamp.typeOrNull(load.object()); if (type != null && !type.isArray()) { diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/UnsafeArrayCopyNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -93,7 +93,7 @@ @Override public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA) { UnsafeArrayCopySnippets.Templates templates = tool.getReplacements().getSnippetTemplateCache(UnsafeArrayCopySnippets.Templates.class); templates.lower(this); } diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -107,7 +107,7 @@ @Override public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { GuardingNode guard = tool.createGuard(condition(), getReason(), getAction(), isNegated()); ValueAnchorNode newAnchor = graph().add(new ValueAnchorNode(guard.asNode())); this.replaceAtUsages(guard.asNode()); diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardingPiNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -77,7 +77,7 @@ @Override public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { throw new GraalInternalError("Cannot create guards in after-guard lowering"); } GuardingNode guard = tool.createGuard(condition, reason, action, negated); diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Wed Sep 18 21:57:23 2013 +0200 @@ -77,7 +77,7 @@ private final ResolvedJavaMethod method; private final long graphId; private final int entryBCI; - private GuardsStage guardsPhase = GuardsStage.FLOATING_GUARDS; + private GuardsStage guardsStage = GuardsStage.FLOATING_GUARDS; /** * Creates a new Graph containing a single {@link AbstractBeginNode} as the {@link #start() @@ -417,12 +417,12 @@ } } - public GuardsStage getGuardsPhase() { - return guardsPhase; + public GuardsStage getGuardsStage() { + return guardsStage; } - public void setGuardsPhase(GuardsStage guardsPhase) { - assert guardsPhase.ordinal() >= this.guardsPhase.ordinal(); - this.guardsPhase = guardsPhase; + public void setGuardsStage(GuardsStage guardsStage) { + assert guardsStage.ordinal() >= this.guardsStage.ordinal(); + this.guardsStage = guardsStage; } } diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/WriteBarrier.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/WriteBarrier.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/WriteBarrier.java Wed Sep 18 21:57:23 2013 +0200 @@ -54,7 +54,7 @@ @Override public void lower(LoweringTool generator) { - assert graph().getGuardsPhase() == StructuredGraph.GuardsStage.AFTER_FSA; + assert graph().getGuardsStage() == StructuredGraph.GuardsStage.AFTER_FSA; generator.getRuntime().lower(this, generator); } } diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LoadHubNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LoadHubNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/LoadHubNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -59,7 +59,7 @@ @Override public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { tool.getRuntime().lower(this, tool); } } diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FrameStateAssignmentPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FrameStateAssignmentPhase.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FrameStateAssignmentPhase.java Wed Sep 18 21:57:23 2013 +0200 @@ -89,7 +89,7 @@ assert checkFixedDeopts(graph); ReentrantNodeIterator.apply(new FrameStateAssignmentClosure(), graph.start(), null, null); - graph.setGuardsPhase(GuardsStage.AFTER_FSA); + graph.setGuardsStage(GuardsStage.AFTER_FSA); } private static boolean checkFixedDeopts(StructuredGraph graph) { diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Wed Sep 18 21:57:23 2013 +0200 @@ -189,7 +189,7 @@ processBlock(block, schedule, context.getTarget().implicitNullCheckLimit); } - graph.setGuardsPhase(GuardsStage.FIXED_DEOPTS); + graph.setGuardsStage(GuardsStage.FIXED_DEOPTS); } private static void processBlock(Block block, SchedulePhase schedule, int implicitNullCheckLimit) { diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/LoweringPhase.java Wed Sep 18 21:57:23 2013 +0200 @@ -95,7 +95,7 @@ @Override public GuardingNode createGuard(LogicNode condition, DeoptimizationReason deoptReason, DeoptimizationAction action, boolean negated) { - if (condition.graph().getGuardsPhase().ordinal() > StructuredGraph.GuardsStage.FLOATING_GUARDS.ordinal()) { + if (condition.graph().getGuardsStage().ordinal() > StructuredGraph.GuardsStage.FLOATING_GUARDS.ordinal()) { throw new GraalInternalError("Cannot create guards after guard lowering"); } if (OptEliminateGuards.getValue()) { diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerExactArithmeticSplitNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerExactArithmeticSplitNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/arithmetic/IntegerExactArithmeticSplitNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -81,7 +81,7 @@ protected abstract Value generateArithmetic(LIRGeneratorTool generator); static void lower(LoweringTool tool, IntegerExactArithmeticNode node) { - if (node.asNode().graph().getGuardsPhase() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { + if (node.asNode().graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) { FloatingNode floatingNode = (FloatingNode) node; FixedWithNextNode previous = tool.lastFixedNode(); FixedNode next = previous.next(); diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomTypeCheckNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomTypeCheckNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/CustomTypeCheckNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -51,7 +51,7 @@ } public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { this.replaceAtUsages(graph().unique(new IntegerEqualsNode(condition, ConstantNode.forInt(1, graph())))); this.safeDelete(); } diff -r de32cc4379a4 -r 23d91654c363 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/TypeCastNode.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/TypeCastNode.java Wed Sep 18 21:56:49 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/typesystem/TypeCastNode.java Wed Sep 18 21:57:23 2013 +0200 @@ -60,7 +60,7 @@ } public void lower(LoweringTool tool) { - if (graph().getGuardsPhase() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { + if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FLOATING_GUARDS) { ValueAnchorNode valueAnchorNode = graph().add(new ValueAnchorNode()); UnsafeCastNode unsafeCast = graph().unique(new UnsafeCastNode(object, this.stamp(), (GuardingNode) valueAnchorNode)); this.replaceAtUsages(unsafeCast);