Skip to content
Snippets Groups Projects
Commit be988860 authored by Mick Jordan's avatar Mick Jordan
Browse files

rffi: update RFFIUpCallMethod

parent bea61147
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,13 @@ import com.oracle.truffle.r.runtime.data.RTypedValue;
import com.oracle.truffle.r.runtime.data.RUnboundValue;
import com.oracle.truffle.r.runtime.ffi.CharSXPWrapper;
import com.oracle.truffle.r.runtime.ffi.RFFIVariables;
import com.oracle.truffle.r.runtime.ffi.jni.JNIUpCallsRFFIImpl;
/**
* (Incomplete) Variant of {@link JavaUpCallsRFFIImpl} for Truffle LLVM.
*
*/
public class TruffleLLVM_UpCallsRFFIImpl extends JavaUpCallsRFFIImpl implements VariableUpCallsRFFI {
public class TruffleLLVM_UpCallsRFFIImpl extends JNIUpCallsRFFIImpl implements VariableUpCallsRFFI {
private static TruffleLLVM_UpCallsRFFIImpl singleton;
private static TruffleObject singletonTruffleObject;
......
#
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -69,5 +69,3 @@ checkversion:
ifeq ($(doclean),1)
$(MAKE) clean
endif
\ No newline at end of file
......@@ -44,7 +44,10 @@ public enum RFFIUpCallMethod {
LOGICAL("(object) : object"),
NAMED("(object) : sint32"),
OBJECT("(object) : sint32"),
PRCODE("(object) : object"),
PRENV("(object) : object"),
PRINTNAME("(object) : object"),
PRSEEN("(object) : sint32"),
PRVALUE("(object) : object"),
PutRNGstate("() : void"),
RAW("(object) : object"),
......@@ -54,6 +57,7 @@ public enum RFFIUpCallMethod {
R_BaseEnv("() : object"),
R_BaseNamespace("() : object"),
R_BindingIsLocked("(object, object) : sint32"),
R_CHAR("(object) : object"),
R_CleanUp("(sint32, sint32, sint32) : void"),
R_ExternalPtrAddr("(object) : object"),
R_ExternalPtrProt("(object) : object"),
......@@ -67,6 +71,7 @@ public enum RFFIUpCallMethod {
R_NamespaceRegistry("() : object"),
R_NewHashedEnv("(object, sint32) : object"),
R_ParseVector("(object, sint32, object) : object"),
R_PromiseExpr("(object) : object"),
R_SetExternalPtrAddr("(object, object) : void"),
R_SetExternalPtrProt("(object, object) : void"),
R_SetExternalPtrTag("(object, object) : void"),
......
......@@ -723,4 +723,10 @@ final class TracingUpCallsRFFIImpl implements UpCallsRFFI {
return delegate.PRCODE(x);
}
@Override
public Object R_CHAR(Object x) {
RFFIUtils.traceUpCall("R_CHAR", x);
return delegate.R_CHAR(x);
}
}
......@@ -26,13 +26,14 @@ import static com.oracle.truffle.r.nodes.ffi.RFFIUtils.guaranteeInstanceOf;
import com.oracle.truffle.r.nodes.ffi.JavaUpCallsRFFIImpl;
import com.oracle.truffle.r.runtime.RErrorHandling;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.data.RVector;
import com.oracle.truffle.r.runtime.ffi.CharSXPWrapper;
/**
* Some additional methods to support the native JNI side.
*/
public final class JNIUpCallsRFFIImpl extends JavaUpCallsRFFIImpl {
public class JNIUpCallsRFFIImpl extends JavaUpCallsRFFIImpl {
// Checkstyle: stop method name check
/**
......@@ -63,4 +64,9 @@ public final class JNIUpCallsRFFIImpl extends JavaUpCallsRFFIImpl {
System.out.println("class " + x.getClass());
}
@Override
public Object R_CHAR(Object x) {
throw RInternalError.shouldNotReachHere();
}
}
......@@ -248,4 +248,6 @@ public interface StdUpCallsRFFI {
Object PRCODE(Object x);
Object R_CHAR(Object x);
}
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