diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArray.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArray.java index e35b820fb1aa50de4d89c780e7359e2cc5c8b264..397a154a1f9b7e98db70e1f797a69935d30ce320 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArray.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArray.java @@ -69,6 +69,7 @@ public final class NativeCharArray extends NativeUInt8Array { return new String(mbuf, 0, i); } + @TruffleBoundary public String getString() { byte[] val = getValue(); return new String(val, 0, fakesNullTermination() ? val.length : val.length - 1); diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArrayMR.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArrayMR.java index f52dd8e2e15a2b90da13f3c84f66b2de3814e5e4..3d35ca0ee8650143016277d5e9bff515dbb13ad9 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArrayMR.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativeCharArrayMR.java @@ -22,6 +22,7 @@ */ package com.oracle.truffle.r.runtime.ffi.interop; +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.interop.CanResolve; import com.oracle.truffle.api.interop.MessageResolution; import com.oracle.truffle.api.interop.Resolve; @@ -78,6 +79,7 @@ public class NativeCharArrayMR { @Resolve(message = "EXECUTE") public abstract static class NCAToStringNode extends Node { + @TruffleBoundary protected java.lang.Object access(NativeCharArray receiver, @SuppressWarnings("unused") Object[] arguments) { return new String(receiver.getValue()); }