diff --git a/include/avian/system/system.h b/include/avian/system/system.h index 2427fd1f57..6db26e2e1f 100644 --- a/include/avian/system/system.h +++ b/include/avian/system/system.h @@ -128,9 +128,7 @@ class System : public avian::util::Aborter { virtual Status visit(Thread* thread, Thread* target, ThreadVisitor* visitor) = 0; - virtual uint64_t call(void* function, uintptr_t* arguments, uint8_t* types, - unsigned count, unsigned size, - unsigned returnType) = 0; + virtual Status map(Region**, const char* name) = 0; virtual FileType stat(const char* name, unsigned* length) = 0; virtual Status open(Directory**, const char* name) = 0; diff --git a/src/compile.cpp b/src/compile.cpp index 0f41e6c73a..f9ca60a6a9 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -7426,13 +7426,12 @@ invokeNativeSlow(MyThread* t, object method, void* function) t->checkpoint->noThrow = true; THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow); - result = t->m->system->call - (function, - RUNTIME_ARRAY_BODY(args), - RUNTIME_ARRAY_BODY(types), - count, - footprint * BytesPerWord, - returnType); + result = vm::dynamicCall(function, + RUNTIME_ARRAY_BODY(args), + RUNTIME_ARRAY_BODY(types), + count, + footprint * BytesPerWord, + returnType); } if (methodFlags(t, method) & ACC_SYNCHRONIZED) { diff --git a/src/interpret.cpp b/src/interpret.cpp index 7ab3ce98a7..7ebe6abb98 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -597,13 +597,12 @@ invokeNativeSlow(Thread* t, object method, void* function) t->checkpoint->noThrow = true; THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow); - result = t->m->system->call - (function, - RUNTIME_ARRAY_BODY(args), - RUNTIME_ARRAY_BODY(types), - count, - footprint * BytesPerWord, - returnType); + result = vm::dynamicCall(function, + RUNTIME_ARRAY_BODY(args), + RUNTIME_ARRAY_BODY(types), + count, + footprint * BytesPerWord, + returnType); } if (DebugRun) { diff --git a/src/system/posix.cpp b/src/system/posix.cpp index a27090453d..3cd444ca9f 100644 --- a/src/system/posix.cpp +++ b/src/system/posix.cpp @@ -745,12 +745,6 @@ class MySystem: public System { #endif // not __APPLE__ } - virtual uint64_t call(void* function, uintptr_t* arguments, uint8_t* types, - unsigned count, unsigned size, unsigned returnType) - { - return dynamicCall(function, arguments, types, count, size, returnType); - } - virtual Status map(System::Region** region, const char* name) { Status status = 1; diff --git a/src/system/windows.cpp b/src/system/windows.cpp index bf3b2eae39..3075a394ba 100644 --- a/src/system/windows.cpp +++ b/src/system/windows.cpp @@ -730,12 +730,6 @@ class MySystem: public System { #endif } - virtual uint64_t call(void* function, uintptr_t* arguments, uint8_t* types, - unsigned count, unsigned size, unsigned returnType) - { - return dynamicCall(function, arguments, types, count, size, returnType); - } - virtual Status map(System::Region** region, const char* name) { Status status = 1; size_t nameLen = strlen(name) * 2;