Rewrite the invoke stubs to use JValue[]s.
The tests were only testing the static stubs, so extend the tests to include
non-static stubs too.
Also add just enough of an ARM disassembler to disassemble the invoke stubs.
Change-Id: If71dfb66b8b8188f9d871914f0eaf1013c9993b9
diff --git a/src/thread.cc b/src/thread.cc
index 629cb0f..58ef1fe 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -949,10 +949,10 @@
// Call the handler.
Method* m = handler->GetClass()->FindVirtualMethodForVirtualOrInterface(gUncaughtExceptionHandler_uncaughtException);
- Object* args[2];
- args[0] = peer_;
- args[1] = exception;
- m->Invoke(this, handler, reinterpret_cast<byte*>(&args), NULL);
+ JValue args[2];
+ args[0].l = peer_;
+ args[1].l = exception;
+ m->Invoke(this, handler, args, NULL);
// If the handler threw, clear that exception too.
ClearException();
@@ -968,8 +968,9 @@
Object* group = GetThreadGroup();
if (group != NULL) {
Method* m = group->GetClass()->FindVirtualMethodForVirtualOrInterface(gThreadGroup_removeThread);
- Object* args = peer_;
- m->Invoke(this, group, reinterpret_cast<byte*>(&args), NULL);
+ JValue args[1];
+ args[0].l = peer_;
+ m->Invoke(this, group, args, NULL);
}
}