# HG changeset patch # User Roland Schatz # Date 1396360148 -7200 # Node ID 8c3d770878949aed7828442bc642513ac877e2c2 # Parent 82971f397b94c68eb3eac087630fdc5366e1c914 Code cleanup in FrameStateAssignmentPhase. diff -r 82971f397b94 -r 8c3d77087894 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 Apr 02 14:19:38 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FrameStateAssignmentPhase.java Tue Apr 01 15:49:08 2014 +0200 @@ -36,7 +36,7 @@ /** * This phase transfers {@link FrameState} nodes from {@link StateSplit} nodes to * {@link DeoptimizingNode DeoptimizingNodes}. - * + * * This allow to enter the {@link GuardsStage#AFTER_FSA AFTER_FSA} stage of the graph where no new * node that may cause deoptimization can be introduced anymore. *

@@ -48,7 +48,8 @@ private static class FrameStateAssignmentClosure extends NodeIteratorClosure { @Override - protected FrameState processNode(FixedNode node, FrameState currentState) { + protected FrameState processNode(FixedNode node, FrameState previousState) { + FrameState currentState = previousState; if (node instanceof DeoptimizingNode.DeoptBefore) { DeoptimizingNode.DeoptBefore deopt = (DeoptimizingNode.DeoptBefore) node; if (deopt.canDeoptimize() && deopt.stateBefore() == null) { @@ -57,12 +58,11 @@ } } - FrameState newState = currentState; if (node instanceof StateSplit) { StateSplit stateSplit = (StateSplit) node; FrameState stateAfter = stateSplit.stateAfter(); if (stateAfter != null) { - newState = stateAfter; + currentState = stateAfter; stateSplit.setStateAfter(null); } } @@ -70,20 +70,20 @@ if (node instanceof DeoptimizingNode.DeoptDuring) { DeoptimizingNode.DeoptDuring deopt = (DeoptimizingNode.DeoptDuring) node; if (deopt.canDeoptimize()) { - GraalInternalError.guarantee(newState != null, "no FrameState at DeoptimizingNode %s", deopt); - deopt.computeStateDuring(newState); + GraalInternalError.guarantee(currentState != null, "no FrameState at DeoptimizingNode %s", deopt); + deopt.computeStateDuring(currentState); } } if (node instanceof DeoptimizingNode.DeoptAfter) { DeoptimizingNode.DeoptAfter deopt = (DeoptimizingNode.DeoptAfter) node; if (deopt.canDeoptimize() && deopt.stateAfter() == null) { - GraalInternalError.guarantee(newState != null, "no FrameState at DeoptimizingNode %s", deopt); - deopt.setStateAfter(newState); + GraalInternalError.guarantee(currentState != null, "no FrameState at DeoptimizingNode %s", deopt); + deopt.setStateAfter(currentState); } } - return newState; + return currentState; } @Override