use of org.graalvm.compiler.hotspot.stubs.ForeignCallStub in project graal by oracle.
the class HotSpotForeignCallsProviderImpl method linkForeignCall.
/**
* Creates a {@linkplain ForeignCallStub stub} for a foreign call.
*
* @param descriptor the signature of the call to the stub
* @param address the address of the foreign code to call
* @param prependThread true if the JavaThread value for the current thread is to be prepended
* to the arguments for the call to {@code address}
* @param transition specifies if this is a {@linkplain Transition#LEAF leaf} call
* @param reexecutable specifies if the foreign call can be re-executed without (meaningful)
* side effects. Deoptimization will not return to a point before a foreign call that
* cannot be re-executed.
* @param killedLocations the memory locations killed by the foreign call
*/
public void linkForeignCall(OptionValues options, HotSpotProviders providers, ForeignCallDescriptor descriptor, long address, boolean prependThread, Transition transition, boolean reexecutable, LocationIdentity... killedLocations) {
ForeignCallStub stub = new ForeignCallStub(options, jvmciRuntime, providers, address, descriptor, prependThread, transition, reexecutable, killedLocations);
HotSpotForeignCallLinkage linkage = stub.getLinkage();
HotSpotForeignCallLinkage targetLinkage = stub.getTargetLinkage();
linkage.setCompiledStub(stub);
register(linkage);
register(targetLinkage);
}
Aggregations