Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java @ 9613:0c17815817a4
removed LIRGenerator.method field
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 May 2013 12:14:03 +0200 |
parents | 66db0353f55a |
children | d04944441454 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Tue May 07 23:38:53 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed May 08 12:14:03 2013 +0200 @@ -59,8 +59,8 @@ return (HotSpotRuntime) runtime; } - protected AMD64HotSpotLIRGenerator(StructuredGraph graph, CodeCacheProvider runtime, TargetDescription target, FrameMap frameMap, ResolvedJavaMethod method, CallingConvention cc, LIR lir) { - super(graph, runtime, target, frameMap, method, cc, lir); + protected AMD64HotSpotLIRGenerator(StructuredGraph graph, CodeCacheProvider runtime, TargetDescription target, FrameMap frameMap, CallingConvention cc, LIR lir) { + super(graph, runtime, target, frameMap, cc, lir); } /** @@ -174,7 +174,7 @@ @Override protected boolean needOnlyOopMaps() { // Stubs only need oop maps - return runtime().asStub(method) != null; + return graph.start() instanceof StubStartNode; } /** @@ -201,11 +201,18 @@ append(new AMD64RestoreRegistersOp(save.getSlots().clone(), save)); } + Stub getStub() { + if (graph.start() instanceof StubStartNode) { + return ((StubStartNode) graph.start()).getStub(); + } + return null; + } + @Override public Variable emitCall(RuntimeCallTarget callTarget, CallingConvention callCc, DeoptimizingNode info, Value... args) { - Stub stub = runtime().asStub(method); + Stub stub = getStub(); boolean isCRuntimeCall = ((HotSpotRuntimeCallTarget) callTarget).isCRuntimeCall(); - assert !isCRuntimeCall || stub != null : "direct call to C runtime can only be made from compiled stubs, not from " + method; + assert !isCRuntimeCall || stub != null : "direct call to C runtime can only be made from compiled stubs, not from " + graph; AMD64SaveRegistersOp save = null; StackSlot[] savedRegisterLocations = null;