changeset 2630:c93adece95d2

Small clean up.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 10 May 2011 16:47:49 +0200
parents b129b7da1397
children c4d9b770c377
files graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java
diffstat 4 files changed, 9 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Tue May 10 14:34:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Tue May 10 16:47:49 2011 +0200
@@ -308,9 +308,4 @@
         assert compilation != null;
         return compilation;
     }
-
-    public static C1XCompilation compilationOrNull() {
-        return currentCompilation.get();
-    }
-
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Tue May 10 14:34:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Tue May 10 16:47:49 2011 +0200
@@ -268,10 +268,6 @@
 
     @Override
     public void visitBase(Base x) {
-        // emit phi-instruction move after safepoint since this simplifies
-        // describing the state at the safepoint.
-        //moveToPhi();
-
         // all blocks with a successor must end with an unconditional jump
         // to the successor even if they are consecutive
         lir.jump(x.defaultSuccessor());
@@ -1586,10 +1582,6 @@
 
     protected abstract void genCmpRegMem(Condition condition, CiValue reg, CiValue base, int disp, CiKind kind, LIRDebugInfo info);
 
-    protected abstract void genGetObjectUnsafe(CiValue dest, CiValue src, CiValue offset, CiKind kind, boolean isVolatile);
-
-    protected abstract void genPutObjectUnsafe(CiValue src, CiValue offset, CiValue data, CiKind kind, boolean isVolatile);
-
     /**
      * Implements site-specific information for the XIR interface.
      */
@@ -1658,4 +1650,10 @@
         visitInvoke(invoke);
         return invoke.operand();
     }
+
+
+    @Override
+    public void visitFrameState(FrameState i) {
+        // nothing to do for now
+    }
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java	Tue May 10 14:34:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java	Tue May 10 16:47:49 2011 +0200
@@ -526,52 +526,7 @@
     }
 
     @Override
-    protected void genGetObjectUnsafe(CiValue dst, CiValue src, CiValue offset, CiKind kind, boolean isVolatile) {
-        if (isVolatile && kind == CiKind.Long) {
-            CiAddress addr = new CiAddress(CiKind.Double, src, offset);
-            CiValue tmp = newVariable(CiKind.Double);
-            lir.load(addr, tmp, null);
-            CiValue spill = operands.newVariable(CiKind.Long, VariableFlag.MustStartInMemory);
-            lir.move(tmp, spill);
-            lir.move(spill, dst);
-        } else {
-            CiAddress addr = new CiAddress(kind, src, offset);
-            lir.load(addr, dst, null);
-        }
-    }
-
-    @Override
-    protected void genPutObjectUnsafe(CiValue src, CiValue offset, CiValue data, CiKind kind, boolean isVolatile) {
-        if (isVolatile && kind == CiKind.Long) {
-            CiAddress addr = new CiAddress(CiKind.Double, src, offset);
-            CiValue tmp = newVariable(CiKind.Double);
-            CiValue spill = operands.newVariable(CiKind.Double, VariableFlag.MustStartInMemory);
-            lir.move(data, spill);
-            lir.move(spill, tmp);
-            lir.move(tmp, addr);
-        } else {
-            CiAddress addr = new CiAddress(kind, src, offset);
-            boolean isObj = (kind == CiKind.Jsr || kind == CiKind.Object);
-            if (isObj) {
-                // Do the pre-write barrier, if any.
-                preGCWriteBarrier(addr, false, null);
-                lir.move(data, addr);
-                assert src.isVariableOrRegister() : "must be register";
-                // Seems to be a precise address
-                postGCWriteBarrier(addr, data);
-            } else {
-                lir.move(data, addr);
-            }
-        }
-    }
-
-    @Override
     protected CiValue osrBufferPointer() {
         return Util.nonFatalUnimplemented(null);
     }
-
-    @Override
-    public void visitFrameState(FrameState i) {
-        // nothing to do for now
-    }
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Tue May 10 14:34:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Tue May 10 16:47:49 2011 +0200
@@ -454,7 +454,7 @@
         return "FrameState@" + bci;
     }
 
-
-
-
+    public void visitFrameState(FrameState i) {
+        // nothing to do for now
+    }
 }