# HG changeset patch # User Thomas Wuerthinger # Date 1363560418 -3600 # Node ID e9c6fc51371950c32aacc75008f3122aa6a55f71 # Parent 4e7c62e6930b14ff047cb37b3c785d7043dc642c Remove last usages of scratch register. Separate runtime calls from normal method calls in LIR. diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java --- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java Sun Mar 17 23:46:58 2013 +0100 @@ -780,25 +780,13 @@ } @Override - protected void emitDirectCall(DirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) { - append(new DirectCallOp(callTarget.target(), result, parameters, temps, callState)); - } + protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, LIRFrameState info) { - @Override - protected void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState) { - // The current register allocator cannot handle variables at call sites, need a fixed - // register. - Value targetAddress = AMD64.rax.asValue(); - emitMove(targetAddress, operand(callTarget.computedAddress())); - append(new IndirectCallOp(callTarget.target(), result, parameters, temps, targetAddress, callState)); - } - - @Override - protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, Value targetAddress, LIRFrameState info) { - if (isConstant(targetAddress)) { - append(new DirectCallOp(callTarget, result, arguments, temps, info)); + long maxOffset = callTarget.getMaxCallTargetOffset(); + if (maxOffset != (int) maxOffset) { + append(new AMD64Call.DirectFarRuntimeCallOp(this, callTarget, result, arguments, temps, info)); } else { - append(new IndirectCallOp(callTarget, result, arguments, temps, targetAddress, info)); + append(new AMD64Call.DirectNearRuntimeCallOp(callTarget, result, arguments, temps, info)); } } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java --- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java Sun Mar 17 23:46:58 2013 +0100 @@ -369,7 +369,7 @@ } @Override - protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, Value targetAddress, LIRFrameState info) { + protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, LIRFrameState info) { throw new InternalError("NYI"); } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java --- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java Sun Mar 17 23:46:58 2013 +0100 @@ -112,7 +112,7 @@ } @Override - protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, Value targetAddress, LIRFrameState info) { + protected void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, LIRFrameState info) { // SPARC: Auto-generated method stub } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Sun Mar 17 23:46:58 2013 +0100 @@ -675,7 +675,7 @@ protected abstract void emitIndirectCall(IndirectCallTargetNode callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState callState); - protected abstract void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, Value targetAddress, LIRFrameState info); + protected abstract void emitCall(RuntimeCallTarget callTarget, Value result, Value[] arguments, Value[] temps, LIRFrameState info); protected static Value toStackKind(Value value) { if (value.getKind().getStackKind() != value.getKind()) { @@ -723,7 +723,7 @@ emitMove(loc, arg); argLocations[i] = loc; } - emitCall(callTarget, cc.getReturn(), argLocations, cc.getTemporaries(), Constant.forLong(0), info); + emitCall(callTarget, cc.getReturn(), argLocations, cc.getTemporaries(), info); if (isLegal(cc.getReturn())) { return emitMove(cc.getReturn()); @@ -758,7 +758,7 @@ info = state(); } - emitCall(call, resultOperand, args, cc.getTemporaries(), Constant.forLong(0), info); + emitCall(call, resultOperand, args, cc.getTemporaries(), info); if (isLegal(resultOperand)) { setResult(x, emitMove(resultOperand)); diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java Sun Mar 17 23:46:58 2013 +0100 @@ -52,6 +52,6 @@ @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { masm.movl(deoptimizationReason.getRegister(), tasm.runtime.encodeDeoptActionAndReason(action, reason)); - AMD64Call.directCall(tasm, masm, tasm.runtime.lookupRuntimeCall(DEOPTIMIZE), info); + AMD64Call.directCall(tasm, masm, tasm.runtime.lookupRuntimeCall(DEOPTIMIZE), null, false, info); } } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Sun Mar 17 23:46:58 2013 +0100 @@ -189,11 +189,8 @@ boolean frameOmitted = tasm.frameContext == null; if (!frameOmitted) { - tasm.recordMark(Marks.MARK_EXCEPTION_HANDLER_ENTRY); - AMD64Call.directCall(tasm, asm, runtime().lookupRuntimeCall(EXCEPTION_HANDLER), null); - tasm.recordMark(Marks.MARK_DEOPT_HANDLER_ENTRY); - AMD64Call.directCall(tasm, asm, runtime().lookupRuntimeCall(DEOPT_HANDLER), null); + AMD64Call.directCall(tasm, asm, runtime().lookupRuntimeCall(DEOPT_HANDLER), null, false, null); } else { // No need to emit the stubs for entries back into the method since // it has no calls that can cause such "return" entries diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotUnwindOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotUnwindOp.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotUnwindOp.java Sun Mar 17 23:46:58 2013 +0100 @@ -70,6 +70,6 @@ // Pass the address of the RBP slot in RBP itself masm.leaq(rbp, rbpSlot); - AMD64Call.directCall(tasm, masm, tasm.runtime.lookupRuntimeCall(UNWIND_EXCEPTION), null); + AMD64Call.directCall(tasm, masm, tasm.runtime.lookupRuntimeCall(UNWIND_EXCEPTION), AMD64.r10, false, null); } } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectStaticCallOp.java Sun Mar 17 23:46:58 2013 +0100 @@ -46,7 +46,7 @@ private final Constant metaspaceMethod; private final InvokeKind invokeKind; - AMD64HotspotDirectStaticCallOp(InvokeTarget target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind, Constant metaspaceMethod) { + AMD64HotspotDirectStaticCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind, Constant metaspaceMethod) { super(target, result, parameters, temps, state); assert invokeKind == InvokeKind.Static || invokeKind == InvokeKind.Special; this.metaspaceMethod = metaspaceMethod; diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotspotDirectVirtualCallOp.java Sun Mar 17 23:46:58 2013 +0100 @@ -47,7 +47,7 @@ private final InvokeKind invokeKind; - AMD64HotspotDirectVirtualCallOp(InvokeTarget target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind) { + AMD64HotspotDirectVirtualCallOp(ResolvedJavaMethod target, Value result, Value[] parameters, Value[] temps, LIRFrameState state, InvokeKind invokeKind) { super(target, result, parameters, temps, state); this.invokeKind = invokeKind; assert invokeKind == InvokeKind.Interface || invokeKind == InvokeKind.Virtual; diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/ArrayCopyIntrinsificationTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/ArrayCopyIntrinsificationTest.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/ArrayCopyIntrinsificationTest.java Sun Mar 17 23:46:58 2013 +0100 @@ -52,8 +52,7 @@ Invoke invoke = (Invoke) node; Assert.assertTrue(invoke.callTarget() instanceof DirectCallTargetNode); AbstractCallTargetNode directCall = (AbstractCallTargetNode) invoke.callTarget(); - Assert.assertTrue(directCall.target() instanceof JavaMethod); - JavaMethod callee = (JavaMethod) directCall.target(); + JavaMethod callee = directCall.target(); Assert.assertTrue(callee.getName().equals("")); Assert.assertTrue(runtime.lookupJavaType(ArrayIndexOutOfBoundsException.class).equals(callee.getDeclaringClass()) || runtime.lookupJavaType(NullPointerException.class).equals(callee.getDeclaringClass())); @@ -65,7 +64,7 @@ if (node instanceof Invoke) { Invoke invoke = (Invoke) node; AbstractCallTargetNode directCall = (AbstractCallTargetNode) invoke.callTarget(); - JavaMethod callee = (JavaMethod) directCall.target(); + JavaMethod callee = directCall.target(); if (callee.getDeclaringClass().equals(runtime.lookupJavaType(System.class)) && callee.getName().equals("arraycopy")) { found = true; } else { diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotDirectCallTargetNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotDirectCallTargetNode.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotDirectCallTargetNode.java Sun Mar 17 23:46:58 2013 +0100 @@ -34,7 +34,7 @@ private final InvokeKind invokeKind; - public HotSpotDirectCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, InvokeTarget target, Type callType, InvokeKind invokeKind) { + public HotSpotDirectCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, ResolvedJavaMethod target, Type callType, InvokeKind invokeKind) { super(arguments, returnStamp, signature, target, callType); this.invokeKind = invokeKind; } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotIndirectCallTargetNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotIndirectCallTargetNode.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/HotSpotIndirectCallTargetNode.java Sun Mar 17 23:46:58 2013 +0100 @@ -33,7 +33,8 @@ @Input private ValueNode metaspaceMethod; - public HotSpotIndirectCallTargetNode(ValueNode metaspaceMethod, ValueNode computedAddress, List arguments, Stamp returnStamp, JavaType[] signature, InvokeTarget target, Type callType) { + public HotSpotIndirectCallTargetNode(ValueNode metaspaceMethod, ValueNode computedAddress, List arguments, Stamp returnStamp, JavaType[] signature, ResolvedJavaMethod target, + Type callType) { super(computedAddress, arguments, returnStamp, signature, target, callType); this.metaspaceMethod = metaspaceMethod; } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java --- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Call.java Sun Mar 17 23:46:58 2013 +0100 @@ -31,6 +31,7 @@ import com.oracle.graal.lir.*; import com.oracle.graal.lir.LIRInstruction.Opcode; import com.oracle.graal.lir.asm.*; +import com.oracle.graal.nodes.spi.*; public class AMD64Call { @@ -42,9 +43,9 @@ @Temp protected Value[] temps; @State protected LIRFrameState state; - protected final InvokeTarget callTarget; + protected final ResolvedJavaMethod callTarget; - public DirectCallOp(InvokeTarget callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState state) { + protected DirectCallOp(ResolvedJavaMethod callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState state) { this.callTarget = callTarget; this.result = result; this.parameters = parameters; @@ -55,18 +56,59 @@ @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - emitAlignmentForDirectCall(tasm, masm); - directCall(tasm, masm, callTarget, state); + directCall(tasm, masm, callTarget, null, true, state); + } + } + + @Opcode("CALL_NEAR_RUNTIME") + public static class DirectNearRuntimeCallOp extends AMD64LIRInstruction implements StandardOp.CallOp { + + @Def({REG, ILLEGAL}) protected Value result; + @Use({REG, STACK}) protected Value[] parameters; + @Temp protected Value[] temps; + @State protected LIRFrameState state; + + protected final RuntimeCallTarget callTarget; + + public DirectNearRuntimeCallOp(RuntimeCallTarget callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState state) { + this.callTarget = callTarget; + this.result = result; + this.parameters = parameters; + this.state = state; + this.temps = temps; + assert temps != null; } - protected void emitAlignmentForDirectCall(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { - // make sure that the displacement word of the call ends up word aligned - int offset = masm.codeBuffer.position(); - offset += tasm.target.arch.getMachineCodeCallDisplacementOffset(); - int modulus = tasm.target.wordSize; - if (offset % modulus != 0) { - masm.nop(modulus - offset % modulus); - } + @Override + public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { + directCall(tasm, masm, callTarget, null, false, state); + } + } + + @Opcode("CALL_FAR_RUNTIME") + public static class DirectFarRuntimeCallOp extends AMD64LIRInstruction implements StandardOp.CallOp { + + @Def({REG, ILLEGAL}) protected Value result; + @Use({REG, STACK}) protected Value[] parameters; + @Temp protected Value[] temps; + @State protected LIRFrameState state; + @Temp({REG}) protected AllocatableValue callTemp; + + protected final RuntimeCallTarget callTarget; + + public DirectFarRuntimeCallOp(LIRGeneratorTool gen, RuntimeCallTarget callTarget, Value result, Value[] parameters, Value[] temps, LIRFrameState state) { + this.callTarget = callTarget; + this.result = result; + this.parameters = parameters; + this.state = state; + this.temps = temps; + assert temps != null; + callTemp = gen.newVariable(Kind.Long); + } + + @Override + public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { + directCall(tasm, masm, callTarget, ((RegisterValue) callTemp).getRegister(), false, state); } } @@ -81,7 +123,7 @@ protected final InvokeTarget callTarget; - public IndirectCallOp(InvokeTarget callTarget, Value result, Value[] parameters, Value[] temps, Value targetAddress, LIRFrameState state) { + protected IndirectCallOp(InvokeTarget callTarget, Value result, Value[] parameters, Value[] temps, Value targetAddress, LIRFrameState state) { this.callTarget = callTarget; this.result = result; this.parameters = parameters; @@ -103,20 +145,16 @@ } } - public static void directCall(TargetMethodAssembler tasm, AMD64MacroAssembler masm, InvokeTarget callTarget, LIRFrameState info) { + public static void directCall(TargetMethodAssembler tasm, AMD64MacroAssembler masm, InvokeTarget callTarget, Register scratch, boolean align, LIRFrameState info) { + if (align) { + emitAlignmentForDirectCall(tasm, masm); + } int before = masm.codeBuffer.position(); - if (callTarget instanceof RuntimeCallTarget) { - long maxOffset = ((RuntimeCallTarget) callTarget).getMaxCallTargetOffset(); - if (maxOffset != (int) maxOffset) { - // offset might not fit a 32-bit immediate, generate an - // indirect call with a 64-bit immediate - Register scratch = tasm.frameMap.registerConfig.getScratchRegister(); - masm.movq(scratch, 0L); - masm.call(scratch); - } else { - masm.call(); - } - + if (scratch != null) { + // offset might not fit a 32-bit immediate, generate an + // indirect call with a 64-bit immediate + masm.movq(scratch, 0L); + masm.call(scratch); } else { masm.call(); } @@ -126,6 +164,16 @@ masm.ensureUniquePC(); } + protected static void emitAlignmentForDirectCall(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { + // make sure that the displacement word of the call ends up word aligned + int offset = masm.codeBuffer.position(); + offset += tasm.target.arch.getMachineCodeCallDisplacementOffset(); + int modulus = tasm.target.wordSize; + if (offset % modulus != 0) { + masm.nop(modulus - offset % modulus); + } + } + public static void directJmp(TargetMethodAssembler tasm, AMD64MacroAssembler masm, InvokeTarget target) { int before = masm.codeBuffer.position(); masm.jmp(0, true); diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractCallTargetNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractCallTargetNode.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractCallTargetNode.java Sun Mar 17 23:46:58 2013 +0100 @@ -32,10 +32,10 @@ private final Stamp returnStamp; private final JavaType[] signature; - private final InvokeTarget target; + private final ResolvedJavaMethod target; private final CallingConvention.Type callType; - public AbstractCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, InvokeTarget target, CallingConvention.Type callType) { + public AbstractCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, ResolvedJavaMethod target, CallingConvention.Type callType) { super(arguments); this.returnStamp = returnStamp; this.signature = signature; @@ -52,7 +52,7 @@ return signature; } - public InvokeTarget target() { + public ResolvedJavaMethod target() { return target; } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DirectCallTargetNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DirectCallTargetNode.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DirectCallTargetNode.java Sun Mar 17 23:46:58 2013 +0100 @@ -30,18 +30,12 @@ public class DirectCallTargetNode extends AbstractCallTargetNode { - public DirectCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, InvokeTarget target, CallingConvention.Type callType) { + public DirectCallTargetNode(List arguments, Stamp returnStamp, JavaType[] signature, ResolvedJavaMethod target, CallingConvention.Type callType) { super(arguments, returnStamp, signature, target, callType); } @Override public String targetName() { - if (target() instanceof JavaMethod) { - return "Direct#" + ((JavaMethod) target()).getName(); - } else if (target() != null) { - return "Direct#" + target().getClass().getSimpleName(); - } else { - return "Direct#null"; - } + return "Direct#" + ((JavaMethod) target()).getName(); } } diff -r 4e7c62e6930b -r e9c6fc513719 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IndirectCallTargetNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IndirectCallTargetNode.java Sun Mar 17 22:57:47 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IndirectCallTargetNode.java Sun Mar 17 23:46:58 2013 +0100 @@ -32,7 +32,7 @@ @Input protected ValueNode computedAddress; - public IndirectCallTargetNode(ValueNode computedAddress, List arguments, Stamp returnStamp, JavaType[] signature, InvokeTarget target, CallingConvention.Type callType) { + public IndirectCallTargetNode(ValueNode computedAddress, List arguments, Stamp returnStamp, JavaType[] signature, ResolvedJavaMethod target, CallingConvention.Type callType) { super(arguments, returnStamp, signature, target, callType); this.computedAddress = computedAddress; } @@ -43,12 +43,6 @@ @Override public String targetName() { - if (target() instanceof JavaMethod) { - return "Indirect#" + ((JavaMethod) target()).getName(); - } else if (target() != null) { - return "Indirect#" + target().getClass().getSimpleName(); - } else { - return "Indirect#null"; - } + return "Indirect#" + ((JavaMethod) target()).getName(); } }