Skip to content
Snippets Groups Projects
Commit 321b436e authored by stepan's avatar stepan
Browse files

Add missing Truffle Boundary

parent 912cc6f5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment