changeset 2635:0f69be73d5ce

More frame state fixes.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 11:21:15 +0200
parents 4dd0573f510b
children 8c02ca1e9eb1
files graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java graal/GraalCompiler/src/com/sun/c1x/ir/Value.java graal/GraalCompiler/src/com/sun/c1x/opt/InstructionSubstituter.java
diffstat 4 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed May 11 10:52:37 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed May 11 11:21:15 2011 +0200
@@ -1465,7 +1465,7 @@
 
     private void walkStateValue(Value value) {
         if (value != null) {
-            assert !value.hasSubst() : "missed substitution";
+            assert !value.hasSubst() : "missed substitution on " + value.toString();
             if (value instanceof Phi && !value.isIllegal()) {
                 // phi's are special
                 operandForPhi((Phi) value);
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java	Wed May 11 10:52:37 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java	Wed May 11 11:21:15 2011 +0200
@@ -237,10 +237,6 @@
      */
     public final void allValuesDo(ValueClosure closure) {
         inputValuesDo(closure);
-        FrameState stateAfter = stateAfter();
-        if (stateAfter != null) {
-            stateAfter.inputValuesDo(closure);
-        }
     }
 
     /**
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Value.java	Wed May 11 10:52:37 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Value.java	Wed May 11 11:21:15 2011 +0200
@@ -270,6 +270,9 @@
         for (int i = 0; i < inputs().size(); i++) {
             inputs().set(i, closure.apply((Value) inputs().get(i)));
         }
+        for (int i = 0; i < successors().size(); i++) {
+            successors().set(i, closure.apply((Value) successors().get(i)));
+        }
     }
 
     @Override
--- a/graal/GraalCompiler/src/com/sun/c1x/opt/InstructionSubstituter.java	Wed May 11 10:52:37 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/opt/InstructionSubstituter.java	Wed May 11 11:21:15 2011 +0200
@@ -89,6 +89,10 @@
     }
 
     public Value apply(Value i) {
+        if (i instanceof FrameState) {
+            FrameState state = (FrameState) i;
+            state.inputValuesDo(this);
+        }
         if (i != null) {
             return getSubst(i);
         }