changeset 2649:62306ff0ccc2

Removed check for direct compare.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 14:42:19 +0200
parents 0bf54306c139
children ccab1d5f345e
files graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java
diffstat 1 files changed, 17 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:39:56 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:42:19 2011 +0200
@@ -509,59 +509,50 @@
         append(new If(x, cond, y, tsucc, fsucc, isSafepoint ? stateBefore : null, isSafepoint, graph));
     }
 
-    void genIfZero(Condition cond) {
+    private void genIfZero(Condition cond) {
         Value y = appendConstant(CiConstant.INT_0);
         FrameState stateBefore = frameState.create(bci());
         Value x = frameState.ipop();
         ifNode(x, cond, y, stateBefore);
     }
 
-    void genIfNull(Condition cond) {
+    private void genIfNull(Condition cond) {
         FrameState stateBefore = frameState.create(bci());
         Value y = appendConstant(CiConstant.NULL_OBJECT);
         Value x = frameState.apop();
         ifNode(x, cond, y, stateBefore);
     }
 
-    void genIfSame(CiKind kind, Condition cond) {
+    private void genIfSame(CiKind kind, Condition cond) {
         FrameState stateBefore = frameState.create(bci());
         Value y = frameState.pop(kind);
         Value x = frameState.pop(kind);
         ifNode(x, cond, y, stateBefore);
     }
 
-    void genThrow(int bci) {
+    private void genThrow(int bci) {
         FrameState stateBefore = frameState.create(bci);
         Throw t = new Throw(frameState.apop(), !noSafepoints(), graph);
         t.setStateBefore(stateBefore);
         appendWithoutOptimization(t, bci);
     }
 
-    void genCheckCast() {
+    private void genCheckCast() {
         int cpi = stream().readCPI();
         RiType type = constantPool().lookupType(cpi, CHECKCAST);
         boolean isInitialized = !C1XOptions.TestPatching && type.isResolved() && type.isInitialized();
         Value typeInstruction = genResolveClass(RiType.Representation.ObjectHub, type, isInitialized, cpi);
         CheckCast c = new CheckCast(type, typeInstruction, frameState.apop(), graph);
         frameState.apush(append(c));
-        checkForDirectCompare(c);
     }
 
-    void genInstanceOf() {
+    private void genInstanceOf() {
         int cpi = stream().readCPI();
         RiType type = constantPool().lookupType(cpi, INSTANCEOF);
         boolean isInitialized = !C1XOptions.TestPatching && type.isResolved() && type.isInitialized();
         Value typeInstruction = genResolveClass(RiType.Representation.ObjectHub, type, isInitialized, cpi);
         InstanceOf i = new InstanceOf(type, typeInstruction, frameState.apop(), graph);
         frameState.ipush(append(i));
-        checkForDirectCompare(i);
-    }
-
-    private void checkForDirectCompare(TypeCheck check) {
-        RiType type = check.targetClass();
-        if (!type.isResolved() || type.isArrayClass()) {
-            return;
-        }
     }
 
     void genNewInstance(int cpi) {
@@ -575,14 +566,14 @@
         frameState.apush(append(n));
     }
 
-    void genNewTypeArray(int typeCode) {
+    private void genNewTypeArray(int typeCode) {
         CiKind kind = CiKind.fromArrayTypeCode(typeCode);
         RiType elementType = compilation.runtime.asRiType(kind);
         NewTypeArray nta = new NewTypeArray(frameState.ipop(), elementType, graph);
         frameState.apush(append(nta));
     }
 
-    void genNewObjectArray(int cpi) {
+    private void genNewObjectArray(int cpi) {
         RiType type = constantPool().lookupType(cpi, ANEWARRAY);
         FrameState stateBefore = null;
         if (!type.isResolved()) {
@@ -593,7 +584,7 @@
         n.setStateBefore(stateBefore);
     }
 
-    void genNewMultiArray(int cpi) {
+    private void genNewMultiArray(int cpi) {
         RiType type = constantPool().lookupType(cpi, MULTIANEWARRAY);
         FrameState stateBefore = null;
         if (!type.isResolved()) {
@@ -609,7 +600,7 @@
         n.setStateBefore(stateBefore);
     }
 
-    void genGetField(int cpi, RiField field) {
+    private void genGetField(int cpi, RiField field) {
         // Must copy the state here, because the field holder must still be on the stack.
         FrameState stateBefore = null;
         if (!field.isResolved()) {
@@ -620,7 +611,7 @@
         load.setStateBefore(stateBefore);
     }
 
-    void genPutField(int cpi, RiField field) {
+    private void genPutField(int cpi, RiField field) {
         // Must copy the state here, because the field holder must still be on the stack.
         FrameState stateBefore = null;
         if (!field.isResolved()) {
@@ -632,7 +623,7 @@
         store.setStateBefore(stateBefore);
     }
 
-    void genGetStatic(int cpi, RiField field) {
+    private void genGetStatic(int cpi, RiField field) {
         RiType holder = field.holder();
         boolean isInitialized = !C1XOptions.TestPatching && field.isResolved();
         CiConstant constantValue = null;
@@ -652,7 +643,7 @@
         }
     }
 
-    void genPutStatic(int cpi, RiField field) {
+    private void genPutStatic(int cpi, RiField field) {
         RiType holder = field.holder();
         FrameState stateBefore = null;
         if (!field.isResolved()) {
@@ -686,7 +677,7 @@
         frameState.push(kind.stackKind(), optimized);
     }
 
-    void genInvokeStatic(RiMethod target, int cpi, RiConstantPool constantPool) {
+    private void genInvokeStatic(RiMethod target, int cpi, RiConstantPool constantPool) {
         RiType holder = target.holder();
         boolean isInitialized = !C1XOptions.TestPatching && target.isResolved() && holder.isInitialized();
         if (!isInitialized && C1XOptions.ResolveClassBeforeStaticInvoke) {
@@ -699,19 +690,19 @@
         appendInvoke(INVOKESTATIC, target, args, cpi, constantPool);
     }
 
-    void genInvokeInterface(RiMethod target, int cpi, RiConstantPool constantPool) {
+    private void genInvokeInterface(RiMethod target, int cpi, RiConstantPool constantPool) {
         Value[] args = frameState.popArguments(target.signature().argumentSlots(true));
         genInvokeIndirect(INVOKEINTERFACE, target, args, cpi, constantPool);
 
     }
 
-    void genInvokeVirtual(RiMethod target, int cpi, RiConstantPool constantPool) {
+    private void genInvokeVirtual(RiMethod target, int cpi, RiConstantPool constantPool) {
         Value[] args = frameState.popArguments(target.signature().argumentSlots(true));
         genInvokeIndirect(INVOKEVIRTUAL, target, args, cpi, constantPool);
 
     }
 
-    void genInvokeSpecial(RiMethod target, RiType knownHolder, int cpi, RiConstantPool constantPool) {
+    private void genInvokeSpecial(RiMethod target, RiType knownHolder, int cpi, RiConstantPool constantPool) {
         Value[] args = frameState.popArguments(target.signature().argumentSlots(true));
         invokeDirect(target, args, knownHolder, cpi, constantPool);