src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java

Print this page




 129                     boolean reexecutable, LocationIdentity... killedLocations) {
 130         Class<?> resultType = descriptor.getResultType();
 131         assert address != 0;
 132         assert transition != SAFEPOINT || resultType.isPrimitive() || Word.class.isAssignableFrom(resultType) : "non-leaf foreign calls must return objects in thread local storage: " + descriptor;
 133         return register(HotSpotForeignCallLinkageImpl.create(metaAccess, codeCache, wordTypes, this, descriptor, address, effect, outgoingCcType, null, transition, reexecutable, killedLocations));
 134     }
 135 
 136     /**
 137      * Creates a {@linkplain ForeignCallStub stub} for a foreign call.
 138      *
 139      * @param descriptor the signature of the call to the stub
 140      * @param address the address of the foreign code to call
 141      * @param prependThread true if the JavaThread value for the current thread is to be prepended
 142      *            to the arguments for the call to {@code address}
 143      * @param transition specifies if this is a {@linkplain Transition#LEAF leaf} call
 144      * @param reexecutable specifies if the foreign call can be re-executed without (meaningful)
 145      *            side effects. Deoptimization will not return to a point before a foreign call that
 146      *            cannot be re-executed.
 147      * @param killedLocations the memory locations killed by the foreign call
 148      */
 149     public void linkForeignCall(OptionValues options, HotSpotProviders providers, ForeignCallDescriptor descriptor, long address, boolean prependThread, Transition transition,
 150                     boolean reexecutable, LocationIdentity... killedLocations) {
 151         ForeignCallStub stub = new ForeignCallStub(options, jvmciRuntime, providers, address, descriptor, prependThread, transition, reexecutable, killedLocations);
 152         HotSpotForeignCallLinkage linkage = stub.getLinkage();
 153         HotSpotForeignCallLinkage targetLinkage = stub.getTargetLinkage();
 154         linkage.setCompiledStub(stub);
 155         register(linkage);
 156         register(targetLinkage);
 157     }
 158 
 159     public static final boolean PREPEND_THREAD = true;
 160     public static final boolean DONT_PREPEND_THREAD = !PREPEND_THREAD;
 161 
 162     public static final boolean REEXECUTABLE = true;
 163     public static final boolean NOT_REEXECUTABLE = !REEXECUTABLE;
 164 
 165     public static final LocationIdentity[] NO_LOCATIONS = {};
 166 
 167     @Override
 168     public HotSpotForeignCallLinkage lookupForeignCall(ForeignCallDescriptor descriptor) {
 169         assert foreignCalls != null : descriptor;
 170         HotSpotForeignCallLinkage callTarget = foreignCalls.get(descriptor);




 129                     boolean reexecutable, LocationIdentity... killedLocations) {
 130         Class<?> resultType = descriptor.getResultType();
 131         assert address != 0;
 132         assert transition != SAFEPOINT || resultType.isPrimitive() || Word.class.isAssignableFrom(resultType) : "non-leaf foreign calls must return objects in thread local storage: " + descriptor;
 133         return register(HotSpotForeignCallLinkageImpl.create(metaAccess, codeCache, wordTypes, this, descriptor, address, effect, outgoingCcType, null, transition, reexecutable, killedLocations));
 134     }
 135 
 136     /**
 137      * Creates a {@linkplain ForeignCallStub stub} for a foreign call.
 138      *
 139      * @param descriptor the signature of the call to the stub
 140      * @param address the address of the foreign code to call
 141      * @param prependThread true if the JavaThread value for the current thread is to be prepended
 142      *            to the arguments for the call to {@code address}
 143      * @param transition specifies if this is a {@linkplain Transition#LEAF leaf} call
 144      * @param reexecutable specifies if the foreign call can be re-executed without (meaningful)
 145      *            side effects. Deoptimization will not return to a point before a foreign call that
 146      *            cannot be re-executed.
 147      * @param killedLocations the memory locations killed by the foreign call
 148      */
 149     public void linkForeignCall(OptionValues options, HotSpotProviders providers, ForeignCallDescriptor descriptor, long address, boolean prependThread, Transition transition, boolean reexecutable,
 150                     LocationIdentity... killedLocations) {
 151         ForeignCallStub stub = new ForeignCallStub(options, jvmciRuntime, providers, address, descriptor, prependThread, transition, reexecutable, killedLocations);
 152         HotSpotForeignCallLinkage linkage = stub.getLinkage();
 153         HotSpotForeignCallLinkage targetLinkage = stub.getTargetLinkage();
 154         linkage.setCompiledStub(stub);
 155         register(linkage);
 156         register(targetLinkage);
 157     }
 158 
 159     public static final boolean PREPEND_THREAD = true;
 160     public static final boolean DONT_PREPEND_THREAD = !PREPEND_THREAD;
 161 
 162     public static final boolean REEXECUTABLE = true;
 163     public static final boolean NOT_REEXECUTABLE = !REEXECUTABLE;
 164 
 165     public static final LocationIdentity[] NO_LOCATIONS = {};
 166 
 167     @Override
 168     public HotSpotForeignCallLinkage lookupForeignCall(ForeignCallDescriptor descriptor) {
 169         assert foreignCalls != null : descriptor;
 170         HotSpotForeignCallLinkage callTarget = foreignCalls.get(descriptor);


src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotForeignCallsProviderImpl.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File