You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GR-40782] Error encountered while parsing org.graalvm.nativebridge.ForeignException.callCreateForeignException on js-postmerge-pgo-profiles-jdk17-linux-amd64.
The annotation processor generates class `NativeCalculatorGen` with a static factory method `createHotSpotToNative(NativeIsolate isolate, long handle)`. The method creates an instance of `NativeCalculator` that forwards `add` and `sub` methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
28
+
The annotation processor generates class `NativeCalculatorGen` with a static factory method `createHSToNative(NativeIsolate isolate, long handle)`. The method creates an instance of `NativeCalculator` that forwards `add` and `sub` methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
29
29
30
30
To use the generated stubs we need to first create an isolate and obtain a foreign object handle before we can call into the generated interface.
31
31
@@ -34,7 +34,7 @@ long isolateThreadId = ExampleJNIConfig.createIsolate();
34
34
long isolateId =ExampleJNIConfig.getIsolateId(isolateThreadId);
35
35
long calculatorHandle =ExampleJNIConfig.initializeCalculator(isolateThreadId);
The annotation processor generates class `HSCalculatorGen` with a static factory method `createNativeToHotSpot(JNIEnv jniEnv, JObject handle)`. The method creates an instance of `HSCalculator` that forwards `add` and `sub` methods from a Native Image to an object in a HotSpot VM.
55
+
The annotation processor generates class `HSCalculatorGen` with a static factory method `createNativeToHS(JNIEnv jniEnv, JObject handle)`. The method creates an instance of `HSCalculator` that forwards `add` and `sub` methods from a Native Image to an object in a HotSpot VM.
56
56
57
57
### Bridging a class
58
58
@@ -80,7 +80,7 @@ abstract class NativeCalculator extends Calculator {
80
80
}
81
81
```
82
82
83
-
The annotation processor generates class `NativeCalculatorGen` with a static `createHotSpotToNative(NativeIsolate isolate, long handle)` factory method creating a `NativeCalculator` instance forwarding `add` and `sub` methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
83
+
The annotation processor generates class `NativeCalculatorGen` with a static `createHSToNative(NativeIsolate isolate, long handle)` factory method creating a `NativeCalculator` instance forwarding `add` and `sub` methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
84
84
85
85
To use the generated stubs we need to first create an isolate and obtain a foreign object handle before we can call into the generated interface.
86
86
@@ -89,7 +89,7 @@ long isolateThreadId = ExampleJNIConfig.createIsolate();
89
89
long isolateId =ExampleJNIConfig.getIsolateId(isolateThreadId);
90
90
long calculatorHandle =ExampleJNIConfig.initializeCalculator(isolateThreadId);
@@ -108,7 +108,7 @@ abstract class HSCalculator extends Calculator {
108
108
}
109
109
```
110
110
111
-
The annotation processor generates class `HSCalculatorGen` with a static `createNativeToHotSpot(HSObject delegate, JNIEnv jniEnv)` factory method creating an `HSCalculator` instance forwarding `add` and `sub` methods from a Native Image to an object in a HotSpot VM.
111
+
The annotation processor generates class `HSCalculatorGen` with a static `createNativeToHS(HSObject delegate, JNIEnv jniEnv)` factory method creating an `HSCalculator` instance forwarding `add` and `sub` methods from a Native Image to an object in a HotSpot VM.
112
112
113
113
### Bridging a class with a custom dispatch
114
114
@@ -154,7 +154,7 @@ To generate a bridge from a HotSpot VM to a Native Image, create an abstract bas
@@ -173,7 +173,7 @@ abstract class NativeLanguageDispatch extends AbstractLanguageDispatch {
173
173
}
174
174
```
175
175
176
-
The annotation processor generates class `NativeLanguageDispatchGen` with a static `createHotSpotToNative()` factory method creating a `NativeLanguageDispatch` instance forwarding methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
176
+
The annotation processor generates class `NativeLanguageDispatchGen` with a static `createHSToNative()` factory method creating a `NativeLanguageDispatch` instance forwarding methods from the HotSpot VM to an object in the native image heap. The `jniConfig` attribute will be explained in the [JNIConfig](#JNIConfig) section.
177
177
178
178
To use the generated stubs we need to first create an isolate and obtain a foreign object handle before we can call into the generated interface.
0 commit comments