mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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,
|
virtual Status visit(Thread* thread, Thread* target,
|
||||||
ThreadVisitor* visitor) = 0;
|
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 Status map(Region**, const char* name) = 0;
|
||||||
virtual FileType stat(const char* name, unsigned* length) = 0;
|
virtual FileType stat(const char* name, unsigned* length) = 0;
|
||||||
virtual Status open(Directory**, const char* name) = 0;
|
virtual Status open(Directory**, const char* name) = 0;
|
||||||
|
@ -7426,13 +7426,12 @@ invokeNativeSlow(MyThread* t, object method, void* function)
|
|||||||
t->checkpoint->noThrow = true;
|
t->checkpoint->noThrow = true;
|
||||||
THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow);
|
THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow);
|
||||||
|
|
||||||
result = t->m->system->call
|
result = vm::dynamicCall(function,
|
||||||
(function,
|
RUNTIME_ARRAY_BODY(args),
|
||||||
RUNTIME_ARRAY_BODY(args),
|
RUNTIME_ARRAY_BODY(types),
|
||||||
RUNTIME_ARRAY_BODY(types),
|
count,
|
||||||
count,
|
footprint * BytesPerWord,
|
||||||
footprint * BytesPerWord,
|
returnType);
|
||||||
returnType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (methodFlags(t, method) & ACC_SYNCHRONIZED) {
|
if (methodFlags(t, method) & ACC_SYNCHRONIZED) {
|
||||||
|
@ -597,13 +597,12 @@ invokeNativeSlow(Thread* t, object method, void* function)
|
|||||||
t->checkpoint->noThrow = true;
|
t->checkpoint->noThrow = true;
|
||||||
THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow);
|
THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow);
|
||||||
|
|
||||||
result = t->m->system->call
|
result = vm::dynamicCall(function,
|
||||||
(function,
|
RUNTIME_ARRAY_BODY(args),
|
||||||
RUNTIME_ARRAY_BODY(args),
|
RUNTIME_ARRAY_BODY(types),
|
||||||
RUNTIME_ARRAY_BODY(types),
|
count,
|
||||||
count,
|
footprint * BytesPerWord,
|
||||||
footprint * BytesPerWord,
|
returnType);
|
||||||
returnType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugRun) {
|
if (DebugRun) {
|
||||||
|
@ -745,12 +745,6 @@ class MySystem: public System {
|
|||||||
#endif // not __APPLE__
|
#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) {
|
virtual Status map(System::Region** region, const char* name) {
|
||||||
Status status = 1;
|
Status status = 1;
|
||||||
|
|
||||||
|
@ -730,12 +730,6 @@ class MySystem: public System {
|
|||||||
#endif
|
#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) {
|
virtual Status map(System::Region** region, const char* name) {
|
||||||
Status status = 1;
|
Status status = 1;
|
||||||
size_t nameLen = strlen(name) * 2;
|
size_t nameLen = strlen(name) * 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user