Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotHostBackend.java @ 23348:9306a9611097
Update JVMCI import: Make CallingConvention.Type extensible; remove unused stackOnly parameter
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 21 Jan 2016 14:24:24 -0800 |
parents | f868bd0c3f02 |
children |
comparison
equal
deleted
inserted
replaced
23347:f868bd0c3f02 | 23348:9306a9611097 |
---|---|
22 */ | 22 */ |
23 package com.oracle.graal.hotspot; | 23 package com.oracle.graal.hotspot; |
24 | 24 |
25 import static com.oracle.graal.compiler.common.GraalOptions.BootstrapReplacements; | 25 import static com.oracle.graal.compiler.common.GraalOptions.BootstrapReplacements; |
26 import static com.oracle.graal.compiler.common.GraalOptions.Intrinsify; | 26 import static com.oracle.graal.compiler.common.GraalOptions.Intrinsify; |
27 import static jdk.vm.ci.code.CallingConvention.Type.JavaCallee; | |
28 import static jdk.vm.ci.code.CodeUtil.getCallingConvention; | 27 import static jdk.vm.ci.code.CodeUtil.getCallingConvention; |
29 import static jdk.vm.ci.inittimer.InitTimer.timer; | 28 import static jdk.vm.ci.inittimer.InitTimer.timer; |
30 import jdk.vm.ci.code.CallingConvention; | 29 import jdk.vm.ci.code.CallingConvention; |
31 import jdk.vm.ci.code.CallingConvention.Type; | 30 import jdk.vm.ci.hotspot.HotSpotCallingConventionType; |
32 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; | 31 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; |
33 import jdk.vm.ci.hotspot.HotSpotVMConfig; | 32 import jdk.vm.ci.hotspot.HotSpotVMConfig; |
34 import jdk.vm.ci.inittimer.InitTimer; | 33 import jdk.vm.ci.inittimer.InitTimer; |
35 import jdk.vm.ci.meta.JavaType; | 34 import jdk.vm.ci.meta.JavaType; |
36 import jdk.vm.ci.meta.ResolvedJavaMethod; | 35 import jdk.vm.ci.meta.ResolvedJavaMethod; |
115 protected CallingConvention makeCallingConvention(StructuredGraph graph, Stub stub) { | 114 protected CallingConvention makeCallingConvention(StructuredGraph graph, Stub stub) { |
116 if (stub != null) { | 115 if (stub != null) { |
117 return stub.getLinkage().getIncomingCallingConvention(); | 116 return stub.getLinkage().getIncomingCallingConvention(); |
118 } | 117 } |
119 | 118 |
120 CallingConvention cc = getCallingConvention(getCodeCache(), Type.JavaCallee, graph.method(), false); | 119 CallingConvention cc = getCallingConvention(getCodeCache(), HotSpotCallingConventionType.JavaCallee, graph.method()); |
121 if (graph.getEntryBCI() != JVMCICompiler.INVOCATION_ENTRY_BCI) { | 120 if (graph.getEntryBCI() != JVMCICompiler.INVOCATION_ENTRY_BCI) { |
122 // for OSR, only a pointer is passed to the method. | 121 // for OSR, only a pointer is passed to the method. |
123 JavaType[] parameterTypes = new JavaType[]{getMetaAccess().lookupJavaType(long.class)}; | 122 JavaType[] parameterTypes = new JavaType[]{getMetaAccess().lookupJavaType(long.class)}; |
124 CallingConvention tmp = getCodeCache().getRegisterConfig().getCallingConvention(JavaCallee, getMetaAccess().lookupJavaType(void.class), parameterTypes, getTarget(), false); | 123 CallingConvention tmp = getCodeCache().getRegisterConfig().getCallingConvention(HotSpotCallingConventionType.JavaCallee, getMetaAccess().lookupJavaType(void.class), parameterTypes, |
124 getTarget()); | |
125 cc = new CallingConvention(cc.getStackSize(), cc.getReturn(), tmp.getArgument(0)); | 125 cc = new CallingConvention(cc.getStackSize(), cc.getReturn(), tmp.getArgument(0)); |
126 } | 126 } |
127 return cc; | 127 return cc; |
128 } | 128 } |
129 | 129 |