Class cast, fill array and interface exception support.
This change uses the deliver exception mechanism to implement support
for a number of runtime exceptions. It also tidies up code in the
compiler and allocates a singular callee save method in the image.
Also adds a fix for JNI internal test where we weren't passing
Thread::Current() and that this value is now being used in generated code.
Change-Id: I57eefd9afe40e92fa3a7e737f1a2ed7e1094b5c1
diff --git a/src/object.h b/src/object.h
index e0a13ca..a562999 100644
--- a/src/object.h
+++ b/src/object.h
@@ -228,7 +228,7 @@
void MonitorEnter(Thread* thread);
- void MonitorExit(Thread* thread);
+ bool MonitorExit(Thread* thread);
void Notify();
@@ -927,8 +927,7 @@
// Is this a hand crafted method used for something like describing callee saves?
bool IsPhony() const {
- bool result =
- NULL == GetFieldObject<Class*>(OFFSET_OF_OBJECT_MEMBER(Method, declaring_class_), false);
+ bool result = this == Runtime::Current()->GetCalleeSaveMethod();
// Check that if we do think it is phony it looks like the callee save method
DCHECK(!result || GetCoreSpillMask() != 0);
return result;
@@ -951,6 +950,7 @@
}
static void SetClass(Class* java_lang_reflect_Method);
+ static Class* GetMethodClass() { return java_lang_reflect_Method_; }
static void ResetClass();
private: