Mercurial > hg > graal-compiler
changeset 4679:7406229b269f
Remove the recording of oop arguments that are passed on the stack.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 23 Feb 2012 22:04:35 +0100 |
parents | a03f3fd16b22 |
children | acf7d88327fa |
files | graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/gen/LIRGenerator.java graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/nodes/TailcallNode.java graal/com.oracle.max.graal.nodes/src/com/oracle/max/graal/nodes/InvokeWithExceptionNode.java |
diffstat | 3 files changed, 8 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- 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<CiStackSlot> pointerSlots = new ArrayList<>(2); - List<CiValue> argList = visitInvokeArguments(cc, callTarget.arguments(), pointerSlots); + List<CiValue> 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<CiValue> visitInvokeArguments(CiCallingConvention cc, Iterable<ValueNode> arguments, List<CiStackSlot> pointerSlots) { + public List<CiValue> visitInvokeArguments(CiCallingConvention cc, Iterable<ValueNode> arguments) { // for each argument, load it into the correct location List<CiValue> 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<CiStackSlot> pointerSlots = new ArrayList<>(2); - List<CiValue> argList = visitInvokeArguments(cc, x.arguments(), pointerSlots); + List<CiValue> argList = visitInvokeArguments(cc, x.arguments()); LIRDebugInfo info = null; FrameState stateAfter = x.stateAfter();
--- 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<CiValue> argList = gen.visitInvokeArguments(cc, parameters, null); + List<CiValue> argList = gen.visitInvokeArguments(cc, parameters); CiValue entry = gen.emitLoad(new CiAddress(CiKind.Long, gen.operand(target), config.nmethodEntryOffset), false);
--- 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; }