mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
Merge pull request #182 from joshuawarner32/ffi-split
split out ffi::call from System
This commit is contained in:
commit
2036eeaaa6
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user