changeset 3001:ef9afe6ffd5e

Removed references to "stateBefore".
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 16 Jun 2011 16:03:26 +0200
parents 6c95d57cb1e2
children bf14154d5b14
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessArray.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessIndexed.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessMonitor.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Arithmetic.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ExceptionObject.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Invoke.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewArray.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewInstance.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewMultiArray.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/TypeCheck.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java
diffstat 15 files changed, 1 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java	Thu Jun 16 16:03:26 2011 +0200
@@ -240,19 +240,6 @@
             if (instr instanceof Instruction) {
                 stateAfter = ((Instruction) instr).stateAfter();
             }
-            FrameState stateBefore = null;
-            if (instr instanceof StateSplit && ((StateSplit) instr).stateAfter() != null) {
-                stateBefore = ((StateSplit) instr).stateBefore();
-            }
-            if (stateBefore != null) {
-                lastState = stateBefore;
-                if (GraalOptions.TraceLIRGeneratorLevel >= 2) {
-                    TTY.println("STATE CHANGE (stateBefore)");
-                    if (GraalOptions.TraceLIRGeneratorLevel >= 3) {
-                        TTY.println(stateBefore.toString());
-                    }
-                }
-            }
             if (instr != instr.graph().start()) {
                 walkState(instr, stateAfter);
                 doRoot((Value) instr);
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessArray.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessArray.java	Thu Jun 16 16:03:26 2011 +0200
@@ -60,7 +60,6 @@
      * Creates a new AccessArray instruction.
      * @param kind the type of the result of this instruction
      * @param array the instruction that produces the array object value
-     * @param stateBefore the frame state before the instruction
      * @param inputCount
      * @param successorCount
      * @param graph
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessIndexed.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessIndexed.java	Thu Jun 16 16:03:26 2011 +0200
@@ -78,7 +78,6 @@
      * @param index the instruction producing the index
      * @param length the instruction producing the length (used in bounds check elimination?)
      * @param elementKind the type of the elements of the array
-     * @param stateBefore the state before executing this instruction
      * @param inputCount
      * @param successorCount
      * @param graph
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessMonitor.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/AccessMonitor.java	Thu Jun 16 16:03:26 2011 +0200
@@ -78,7 +78,6 @@
      *
      * @param object the instruction producing the object
      * @param lockAddress the address of the on-stack lock object or {@code null} if the runtime does not place locks on the stack
-     * @param stateBefore the state before executing the monitor operation
      * @param lockNumber the number of the lock being acquired
      * @param inputCount
      * @param successorCount
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Arithmetic.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Arithmetic.java	Thu Jun 16 16:03:26 2011 +0200
@@ -44,7 +44,6 @@
      * @param x the first input instruction
      * @param y the second input instruction
      * @param isStrictFP indicates this operation has strict rounding semantics
-     * @param stateBefore the state for instructions that may trap
      */
     public Arithmetic(CiKind kind, int opcode, Value x, Value y, boolean isStrictFP, Graph graph) {
         super(kind, opcode, x, y, INPUT_COUNT, SUCCESSOR_COUNT, graph);
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java	Thu Jun 16 16:03:26 2011 +0200
@@ -41,7 +41,6 @@
      * Creates a new CheckCast instruction.
      * @param targetClass the class being cast to
      * @param object the instruction producing the object
-     * @param stateBefore the state before the cast
      * @param graph
      */
     public CheckCast(RiType targetClass, Value targetClassInstruction, Value object, Graph graph) {
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ExceptionObject.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ExceptionObject.java	Thu Jun 16 16:03:26 2011 +0200
@@ -36,7 +36,6 @@
 
     /**
      * Constructs a new ExceptionObject instruction.
-     * @param stateBefore TODO
      * @param graph
      */
     public ExceptionObject(Graph graph) {
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Invoke.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Invoke.java	Thu Jun 16 16:03:26 2011 +0200
@@ -94,7 +94,6 @@
      * @param args the list of instructions producing arguments to the invocation, including the receiver object
      * @param isStatic {@code true} if this call is static (no receiver object)
      * @param target the target method being called
-     * @param stateBefore the state before executing the invocation
      */
     public Invoke(int bci, int opcode, CiKind result, Value[] args, RiMethod target, RiType returnType, RiTypeProfile profile, Graph graph) {
         super(result, args.length, SUCCESSOR_COUNT, graph);
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java	Thu Jun 16 16:03:26 2011 +0200
@@ -63,7 +63,6 @@
     /**
      * Constructs a new NullCheck instruction.
      * @param object the instruction producing the object to check against null
-     * @param stateBefore the state before executing the null check
      * @param graph
      */
     public IsNonNull(Value object, Graph graph) {
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewArray.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewArray.java	Thu Jun 16 16:03:26 2011 +0200
@@ -59,7 +59,6 @@
     /**
      * Constructs a new NewArray instruction.
      * @param length the instruction that produces the length for this allocation
-     * @param stateBefore the state before the allocation
      * @param inputCount
      * @param successorCount
      * @param graph
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewInstance.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewInstance.java	Thu Jun 16 16:03:26 2011 +0200
@@ -43,7 +43,6 @@
      * Constructs a NewInstance instruction.
      * @param type the class being allocated
      * @param cpi the constant pool index
-     * @param stateBefore the state before executing this instruction
      * @param graph
      */
     public NewInstance(RiType type, int cpi, RiConstantPool constantPool, Graph graph) {
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewMultiArray.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NewMultiArray.java	Thu Jun 16 16:03:26 2011 +0200
@@ -75,7 +75,6 @@
      * Constructs a new NewMultiArray instruction.
      * @param elementType the element type of the array
      * @param dimensions the instructions which produce the dimensions for this array
-     * @param stateBefore the state before this instruction
      * @param cpi the constant pool index for resolution
      * @param riConstantPool the constant pool for resolution
      * @param graph
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/StateSplit.java	Thu Jun 16 16:03:26 2011 +0200
@@ -32,8 +32,7 @@
  */
 public abstract class StateSplit extends Instruction {
 
-    private static final int INPUT_COUNT = 1;
-    private static final int INPUT_STATE_BEFORE = 0;
+    private static final int INPUT_COUNT = 0;
 
     private static final int SUCCESSOR_COUNT = 1;
     private static final int SUCCESSOR_STATE_AFTER = 0;
@@ -51,24 +50,6 @@
     /**
      * The state for this instruction.
      */
-    public FrameState stateBefore() {
-        return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE);
-    }
-
-    public FrameState setStateBefore(FrameState n) {
-        FrameState oldState = stateBefore();
-        try {
-            return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n);
-        } finally {
-            if (oldState != n && oldState != null) {
-                oldState.delete();
-            }
-        }
-    }
-
-    /**
-     * The state for this instruction.
-     */
      @Override
     public FrameState stateAfter() {
         return (FrameState) successors().get(super.successorCount() + SUCCESSOR_STATE_AFTER);
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/TypeCheck.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/TypeCheck.java	Thu Jun 16 16:03:26 2011 +0200
@@ -76,7 +76,6 @@
      * @param targetClass the class which is being casted to or checked against
      * @param object the instruction which produces the object
      * @param kind the result type of this instruction
-     * @param stateBefore the state before this instruction is executed
      * @param inputCount
      * @param successorCount
      * @param graph
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java	Thu Jun 16 16:00:01 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/GraphBuilderPhase.java	Thu Jun 16 16:03:26 2011 +0200
@@ -1224,9 +1224,6 @@
     }
 
     private void createDeoptBlock(DeoptBlock block) {
-//        Merge x = new Merge(graph);
-//        x.setStateBefore(((StateSplit) block.firstInstruction).stateBefore());
-//        append(x);
         append(new Deoptimize(DeoptAction.InvalidateReprofile, graph));
     }