changeset 2647:0bf54306c139

Removed accessor workaround.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 14:39:56 +0200
parents ce054e34fbaf
children d456b679b6de 62306ff0ccc2
files graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java
diffstat 1 files changed, 8 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:37:20 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:39:56 2011 +0200
@@ -717,38 +717,6 @@
 
     }
 
-    /**
-     * Temporary work-around to support the @ACCESSOR Maxine annotation.
-     */
-    private static final Class<?> Accessor;
-    static {
-        Class<?> c = null;
-        try {
-            c = Class.forName("com.sun.max.unsafe.Accessor");
-        } catch (ClassNotFoundException e) {
-        }
-        Accessor = c;
-    }
-
-    /**
-     * Temporary work-around to support the @ACCESSOR Maxine annotation.
-     */
-    private static ThreadLocal<RiType> boundAccessor = new ThreadLocal<RiType>();
-
-    /**
-     * Temporary work-around to support the @ACCESSOR Maxine annotation.
-     */
-    private static RiMethod bindAccessorMethod(RiMethod target) {
-        if (Accessor != null && target.isResolved() && target.holder().javaClass() == Accessor) {
-            RiType accessor = boundAccessor.get();
-            assert accessor != null : "Cannot compile call to method in " + target.holder() + " without enclosing @ACCESSOR annotated method";
-            RiMethod newTarget = accessor.resolveMethodImpl(target);
-            assert target != newTarget : "Could not bind " + target + " to a method in " + accessor;
-            target = newTarget;
-        }
-        return target;
-    }
-
     private void genInvokeIndirect(int opcode, RiMethod target, Value[] args, int cpi, RiConstantPool constantPool) {
         Value receiver = args[0];
         // attempt to devirtualize the call
@@ -821,7 +789,7 @@
         return assumed;
     }
 
-    void callRegisterFinalizer() {
+    private void callRegisterFinalizer() {
         Value receiver = frameState.loadLocal(0);
         RiType declaredType = receiver.declaredType();
         RiType receiverType = declaredType;
@@ -860,7 +828,7 @@
         }
     }
 
-    void genReturn(Value x) {
+    private void genReturn(Value x) {
         if (method().isConstructor() && method().holder().superType() == null) {
             callRegisterFinalizer();
         }
@@ -880,7 +848,7 @@
         append(new Return(x, !noSafepoints(), graph));
     }
 
-    void genMonitorEnter(Value x, int bci) {
+    private void genMonitorEnter(Value x, int bci) {
         int lockNumber = frameState.locksSize();
         MonitorAddress lockAddress = null;
         if (compilation.runtime.sizeOfBasicObjectLock() != 0) {
@@ -895,7 +863,7 @@
         }
     }
 
-    void genMonitorExit(Value x, int bci) {
+    private void genMonitorExit(Value x, int bci) {
         int lockNumber = frameState.locksSize() - 1;
         if (lockNumber < 0) {
             throw new CiBailout("monitor stack underflow");
@@ -909,15 +877,15 @@
         frameState.unlock();
     }
 
-    void genJsr(int dest) {
+    private void genJsr(int dest) {
         throw new CiBailout("jsr/ret not supported");
     }
 
-    void genRet(int localIndex) {
+    private void genRet(int localIndex) {
         throw new CiBailout("jsr/ret not supported");
     }
 
-    void genTableswitch() {
+    private void genTableswitch() {
         int bci = bci();
         BytecodeTableSwitch ts = new BytecodeTableSwitch(stream(), bci);
         int max = ts.numberOfCases();
@@ -937,7 +905,7 @@
         append(new TableSwitch(frameState.ipop(), list, ts.lowKey(), stateBefore, isSafepoint, graph));
     }
 
-    void genLookupswitch() {
+    private void genLookupswitch() {
         int bci = bci();
         BytecodeLookupSwitch ls = new BytecodeLookupSwitch(stream(), bci);
         int max = ls.numberOfCases();