# HG changeset patch # User Thomas Wuerthinger # Date 1305117596 -7200 # Node ID 0bf54306c139870edd06c1d04b06028bc92474d8 # Parent ce054e34fbaf674fec226294445be6443ac268ad Removed accessor workaround. diff -r ce054e34fbaf -r 0bf54306c139 graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java --- 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 boundAccessor = new ThreadLocal(); - - /** - * 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();