diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2538:e1ba5a93e997

Clean up on Value class and LIRGenerator/LIRItem-related things.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 20:13:54 +0200
parents 4a016ff4d2df
children 3fc322165071
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed Apr 27 19:53:46 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed Apr 27 20:13:54 2011 +0200
@@ -691,9 +691,6 @@
         if (!type.isResolved() || type.isArrayClass()) {
             return;
         }
-        if (assumeLeafClass(type)) {
-            check.setDirectCompare();
-        }
     }
 
     void genNewInstance(int cpi) {
@@ -736,7 +733,7 @@
         // Must copy the state here, because the field holder must still be on the stack.
         FrameState stateBefore = curState.immutableCopy(bci());
         boolean isLoaded = !C1XOptions.TestPatching && field.isResolved();
-        LoadField load = new LoadField(apop(), field, false, stateBefore, isLoaded);
+        LoadField load = new LoadField(apop(), field, stateBefore, isLoaded);
         appendOptimizedLoadField(field.kind(), load);
     }
 
@@ -745,7 +742,7 @@
         FrameState stateBefore = curState.immutableCopy(bci());
         boolean isLoaded = !C1XOptions.TestPatching && field.isResolved();
         Value value = pop(field.kind().stackKind());
-        appendOptimizedStoreField(new StoreField(apop(), field, value, false, stateBefore, isLoaded));
+        appendOptimizedStoreField(new StoreField(apop(), field, value, stateBefore, isLoaded));
     }
 
     void genGetStatic(int cpi, RiField field) {
@@ -759,7 +756,7 @@
             push(constantValue.kind.stackKind(), appendConstant(constantValue));
         } else {
             Value container = genResolveClass(RiType.Representation.StaticFields, holder, isInitialized, cpi);
-            LoadField load = new LoadField(container, field, true, null, isInitialized);
+            LoadField load = new LoadField(container, field, null, isInitialized);
             appendOptimizedLoadField(field.kind(), load);
         }
     }
@@ -769,7 +766,7 @@
         boolean isInitialized = !C1XOptions.TestPatching && field.isResolved() && holder.isResolved() && holder.isInitialized();
         Value container = genResolveClass(RiType.Representation.StaticFields, holder, isInitialized, cpi);
         Value value = pop(field.kind().stackKind());
-        StoreField store = new StoreField(container, field, value, true, null, isInitialized);
+        StoreField store = new StoreField(container, field, value, null, isInitialized);
         appendOptimizedStoreField(store);
     }
 
@@ -824,7 +821,7 @@
 
         Value[] args = curState.popArguments(target.signature().argumentSlots(false));
         if (!tryInline(target, args)) {
-            appendInvoke(INVOKESTATIC, target, args, true, cpi, constantPool);
+            appendInvoke(INVOKESTATIC, target, args, cpi, constantPool);
         }
     }
 
@@ -924,7 +921,7 @@
             }
         }
         // devirtualization failed, produce an actual invokevirtual
-        appendInvoke(opcode, target, args, false, cpi, constantPool);
+        appendInvoke(opcode, target, args, cpi, constantPool);
     }
 
     private CiKind returnKind(RiMethod target) {
@@ -934,13 +931,13 @@
     private void invokeDirect(RiMethod target, Value[] args, RiType knownHolder, int cpi, RiConstantPool constantPool) {
         if (!tryInline(target, args)) {
             // could not optimize or inline the method call
-            appendInvoke(INVOKESPECIAL, target, args, false, cpi, constantPool);
+            appendInvoke(INVOKESPECIAL, target, args, cpi, constantPool);
         }
     }
 
-    private void appendInvoke(int opcode, RiMethod target, Value[] args, boolean isStatic, int cpi, RiConstantPool constantPool) {
+    private void appendInvoke(int opcode, RiMethod target, Value[] args, int cpi, RiConstantPool constantPool) {
         CiKind resultType = returnKind(target);
-        Value result = append(new Invoke(opcode, resultType.stackKind(), args, isStatic, target, target.signature().returnType(compilation.method.holder()), null));
+        Value result = append(new Invoke(opcode, resultType.stackKind(), args, target, target.signature().returnType(compilation.method.holder()), null));
         pushReturn(resultType, result);
     }