Skip to content
Snippets Groups Projects
Commit 5fb6d43d authored by Florian Angerer's avatar Florian Angerer
Browse files

Added missing TruffleBoundary.

parent dd852367
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,7 @@ public class EnvFunctions {
}
@Specialization
@TruffleBoundary
protected REnvironment asEnvironment(RList list,
@Cached("new()") RList2EnvNode list2Env) {
REnvironment env = RDataFactory.createNewEnv(null);
......
......@@ -193,19 +193,26 @@ public final class NativeDataAccess {
RObject obj = (RObject) arg;
NativeMirror mirror = (NativeMirror) obj.getNativeMirror();
if (mirror == null) {
obj.setNativeMirror(mirror = arg instanceof CustomNativeMirror ? new NativeMirror(((CustomNativeMirror) arg).getCustomMirrorAddress()) : new NativeMirror());
// System.out.println(String.format("adding %16x = %s", mirror.id,
// obj.getClass().getSimpleName()));
nativeMirrors.put(mirror.id, new WeakReference<>(obj));
if (TRACE_MIRROR_ALLOCATION_SITES) {
registerAllocationSite(arg, mirror);
}
mirror = putMirrorObject(arg, obj);
}
return mirror.id;
}
throw UnsupportedMessageException.raise(Message.AS_POINTER);
}
@TruffleBoundary
private static NativeMirror putMirrorObject(Object arg, RObject obj) {
NativeMirror mirror;
obj.setNativeMirror(mirror = arg instanceof CustomNativeMirror ? new NativeMirror(((CustomNativeMirror) arg).getCustomMirrorAddress()) : new NativeMirror());
// System.out.println(String.format("adding %16x = %s", mirror.id,
// obj.getClass().getSimpleName()));
nativeMirrors.put(mirror.id, new WeakReference<>(obj));
if (TRACE_MIRROR_ALLOCATION_SITES) {
registerAllocationSite(arg, mirror);
}
return mirror;
}
@TruffleBoundary
private static void registerAllocationSite(Object arg, NativeMirror mirror) {
nativeMirrorInfo.put(mirror.id, new RuntimeException(arg.getClass().getSimpleName() + " " + arg));
......
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