We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ad02e6 commit 157da25Copy full SHA for 157da25
truffle/src/com.oracle.truffle.nfi.test/src/com/oracle/truffle/nfi/test/interop/NativeVector.java
@@ -76,12 +76,12 @@ private static Unsafe getUnsafe() {
76
77
@TruffleBoundary
78
public void transitionToNative() {
79
- assert !isPointer() : "is already transitioned";
+ if (!isPointer()) {
80
+ nativeStorage = unsafe.allocateMemory(vector.length * Double.BYTES);
81
- nativeStorage = unsafe.allocateMemory(vector.length * Double.BYTES);
82
-
83
- for (int i = 0; i < vector.length; i++) {
84
- set(i, vector[i]);
+ for (int i = 0; i < vector.length; i++) {
+ set(i, vector[i]);
+ }
85
}
86
87
0 commit comments