# HG changeset patch # User Thomas Wuerthinger # Date 1330031075 -3600 # Node ID 7406229b269f35b55780fd86e6c3a7a42b6c7364 # Parent a03f3fd16b22cef04a84d3aecb2d8d7389855dd0 Remove the recording of oop arguments that are passed on the stack. diff -r a03f3fd16b22 -r 7406229b269f graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Thu Feb 23 21:43:59 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java Thu Feb 23 22:04:35 2012 +0100 @@ -953,16 +953,15 @@ CiKind[] signature = CiUtil.signatureToKinds(callTarget.targetMethod().signature(), callTarget.isStatic() ? null : callTarget.targetMethod().holder().kind(true)); CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(JavaCall, signature, target(), false); frameMap.callsMethod(cc, JavaCall); - List pointerSlots = new ArrayList<>(2); - List argList = visitInvokeArguments(cc, callTarget.arguments(), pointerSlots); + List argList = visitInvokeArguments(cc, callTarget.arguments()); if (target().invokeSnippetAfterArguments) { // TODO This is the version currently active for HotSpot. - LIRDebugInfo addrInfo = stateFor(stateBeforeCallWithArguments(x.stateAfter(), callTarget, x.bci()), pointerSlots, null); + LIRDebugInfo addrInfo = stateFor(stateBeforeCallWithArguments(x.stateAfter(), callTarget, x.bci()), null, null); destinationAddress = emitXir(snippet, x.node(), addrInfo, false); } - LIRDebugInfo callInfo = stateFor(x.stateDuring(), pointerSlots, x instanceof InvokeWithExceptionNode ? getLIRBlock(((InvokeWithExceptionNode) x).exceptionEdge()) : null); + LIRDebugInfo callInfo = stateFor(x.stateDuring(), null, x instanceof InvokeWithExceptionNode ? getLIRBlock(((InvokeWithExceptionNode) x).exceptionEdge()) : null); emitCall(targetMethod, resultOperand, argList, destinationAddress, callInfo, snippet.marks); if (isLegal(resultOperand)) { @@ -987,20 +986,13 @@ return value; } - public List visitInvokeArguments(CiCallingConvention cc, Iterable arguments, List pointerSlots) { + public List visitInvokeArguments(CiCallingConvention cc, Iterable arguments) { // for each argument, load it into the correct location List argList = new ArrayList<>(); int j = 0; for (ValueNode arg : arguments) { if (arg != null) { CiValue operand = toStackKind(cc.locations[j++]); - - if (isStackSlot(operand) && operand.kind == CiKind.Object && pointerSlots != null) { - assert !asStackSlot(operand).inCallerFrame(); - // This slot must be marked explicitly in the pointer map. - pointerSlots.add(asStackSlot(operand)); - } - emitMove(operand(arg), operand); argList.add(operand); @@ -1056,8 +1048,7 @@ CiValue resultOperand = resultOperandFor(x.kind()); CiCallingConvention cc = frameMap.registerConfig.getCallingConvention(RuntimeCall, x.call().arguments, target(), false); frameMap.callsMethod(cc, RuntimeCall); - List pointerSlots = new ArrayList<>(2); - List argList = visitInvokeArguments(cc, x.arguments(), pointerSlots); + List argList = visitInvokeArguments(cc, x.arguments()); LIRDebugInfo info = null; FrameState stateAfter = x.stateAfter(); diff -r a03f3fd16b22 -r 7406229b269f graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/nodes/TailcallNode.java --- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/nodes/TailcallNode.java Thu Feb 23 21:43:59 2012 +0100 +++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/nodes/TailcallNode.java Thu Feb 23 22:04:35 2012 +0100 @@ -68,7 +68,7 @@ for (int i = 0, slot = 0; i < cc.locations.length; i++, slot += FrameStateBuilder.stackSlots(frameState.localAt(slot).kind())) { parameters.add(frameState.localAt(slot)); } - List argList = gen.visitInvokeArguments(cc, parameters, null); + List argList = gen.visitInvokeArguments(cc, parameters); CiValue entry = gen.emitLoad(new CiAddress(CiKind.Long, gen.operand(target), config.nmethodEntryOffset), false); diff -r a03f3fd16b22 -r 7406229b269f graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/InvokeWithExceptionNode.java --- a/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/InvokeWithExceptionNode.java Thu Feb 23 21:43:59 2012 +0100 +++ b/graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/InvokeWithExceptionNode.java Thu Feb 23 22:04:35 2012 +0100 @@ -126,8 +126,8 @@ } public FrameState stateDuring() { - FrameState stateAfter = stateAfter(); - FrameState stateDuring = stateAfter.duplicateModified(bci(), stateAfter.rethrowException(), this.callTarget.targetMethod().signature().returnKind(false)); + FrameState tempStateAfter = stateAfter(); + FrameState stateDuring = tempStateAfter.duplicateModified(bci(), tempStateAfter.rethrowException(), this.callTarget.targetMethod().signature().returnKind(false)); stateDuring.setDuringCall(true); return stateDuring; }