Skip to content
Snippets Groups Projects
Commit 409719fa authored by Lukas Stadler's avatar Lukas Stadler
Browse files

fix various llvm call issues

parent 7f5aa153
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,6 @@ import com.oracle.truffle.api.nodes.Node; ...@@ -32,7 +32,6 @@ import com.oracle.truffle.api.nodes.Node;
* with a complex result or, in the case of Fortran, to handle call by reference conveniently, or to * with a complex result or, in the case of Fortran, to handle call by reference conveniently, or to
* just have LLVM handle the underlying native call. The wrapper functions names are all of the form * just have LLVM handle the underlying native call. The wrapper functions names are all of the form
* {@code call_xxx_function}, where {@code xxx} is the subsystem. * {@code call_xxx_function}, where {@code xxx} is the subsystem.
*
*/ */
public enum LLVMFunction { public enum LLVMFunction {
// base // base
...@@ -43,14 +42,14 @@ public enum LLVMFunction { ...@@ -43,14 +42,14 @@ public enum LLVMFunction {
readlink(2, "call_base_"), readlink(2, "call_base_"),
mkdtemp(1, "call_base_"), mkdtemp(1, "call_base_"),
chmod(2, "call_base_"), chmod(2, "call_base_"),
strtol(2, "call_base_"), strtol(3, "call_base_"),
uname(0, "call_base_"), uname(1, "call_base_"),
glob(2, "call_base_"), glob(2, "call_base_"),
// PCRE // PCRE
maketables(0, "call_pcre_"), maketables(0, "call_pcre_"),
compile(3, "call_pcre_"), compile(4, "call_pcre_"),
getcapturecount(0, "call_pcre_"), getcapturecount(2, "call_pcre_"),
getcapturenames(2, "call_pcre_"), getcapturenames(3, "call_pcre_"),
study(2, "call_pcre_"), study(2, "call_pcre_"),
exec(8, "call_pcre_"), exec(8, "call_pcre_"),
// RAppl // RAppl
...@@ -87,5 +86,4 @@ public enum LLVMFunction { ...@@ -87,5 +86,4 @@ public enum LLVMFunction {
CompilerAsserts.neverPartOfCompilation(); CompilerAsserts.neverPartOfCompilation();
return Message.createExecute(argCount).createNode(); return Message.createExecute(argCount).createNode();
} }
} }
...@@ -99,7 +99,7 @@ public class TruffleLLVM_PCRE implements PCRERFFI { ...@@ -99,7 +99,7 @@ public class TruffleLLVM_PCRE implements PCRERFFI {
} }
CaptureNamesResult captureNamesCallback = new CaptureNamesResult(captureCount); CaptureNamesResult captureNamesCallback = new CaptureNamesResult(captureCount);
int result = (int) ForeignAccess.sendExecute(message, symbolHandle.asTruffleObject(), int result = (int) ForeignAccess.sendExecute(message, symbolHandle.asTruffleObject(),
code, extra, captureNamesCallback); captureNamesCallback, code, extra);
if (result < 0) { if (result < 0) {
CompilerDirectives.transferToInterpreter(); CompilerDirectives.transferToInterpreter();
throw RError.error(RError.NO_CALLER, RError.Message.WRONG_PCRE_INFO, result); throw RError.error(RError.NO_CALLER, RError.Message.WRONG_PCRE_INFO, result);
......
...@@ -118,26 +118,27 @@ ...@@ -118,26 +118,27 @@
#define SETCADR_x 113 #define SETCADR_x 113
#define SETCAR_x 114 #define SETCAR_x 114
#define SETCDR_x 115 #define SETCDR_x 115
#define SET_RDEBUG_x 116 #define SET_NAMED_FASTR_x 116
#define SET_RSTEP_x 117 #define SET_RDEBUG_x 117
#define SET_S4_OBJECT_x 118 #define SET_RSTEP_x 118
#define SET_STRING_ELT_x 119 #define SET_S4_OBJECT_x 119
#define SET_SYMVALUE_x 120 #define SET_STRING_ELT_x 120
#define SET_TAG_x 121 #define SET_SYMVALUE_x 121
#define SET_TYPEOF_FASTR_x 122 #define SET_TAG_x 122
#define SET_VECTOR_ELT_x 123 #define SET_TYPEOF_FASTR_x 123
#define STRING_ELT_x 124 #define SET_VECTOR_ELT_x 124
#define SYMVALUE_x 125 #define STRING_ELT_x 125
#define TAG_x 126 #define SYMVALUE_x 126
#define TYPEOF_x 127 #define TAG_x 127
#define UNSET_S4_OBJECT_x 128 #define TYPEOF_x 128
#define VECTOR_ELT_x 129 #define UNSET_S4_OBJECT_x 129
#define getConnectionClassString_x 130 #define VECTOR_ELT_x 130
#define getOpenModeString_x 131 #define getConnectionClassString_x 131
#define getSummaryDescription_x 132 #define getOpenModeString_x 132
#define isSeekable_x 133 #define getSummaryDescription_x 133
#define unif_rand_x 134 #define isSeekable_x 134
#define unif_rand_x 135
#define UPCALLS_TABLE_SIZE 135 #define UPCALLS_TABLE_SIZE 136
#endif // RFFI_UPCALLSINDEX_H #endif // RFFI_UPCALLSINDEX_H
...@@ -1080,7 +1080,7 @@ int R_check_class_etc (SEXP x, const char **valid) { ...@@ -1080,7 +1080,7 @@ int R_check_class_etc (SEXP x, const char **valid) {
return R_check_class_etc_helper(x, valid, nfiGetMethodsNamespace); return R_check_class_etc_helper(x, valid, nfiGetMethodsNamespace);
} }
SEXP R_PreserveObject(SEXP x) { SEXP R_PreserveObject_FASTR(SEXP x) {
return newObjectHandle(x); return newObjectHandle(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