Fix compiler class initialization to properly deal with super classes
Also moving active parts of compiler_test to be oat tests including
IntMath and Invoke. Added an interface invocation test case to Invoke
test. Changed Compiler to CHECK that it is not used once the
Runtime::IsStarted, forcing some jni_compiler_test to have two phases,
one for compiling before Runtime::Start and one for JNI operations
after the Runtime::IsStarted.
Finally, fixed Class::CanPutArrayElementFromCode by removing
CanPutArrayElement and calling IsAssignableFrom directly.
Change-Id: I52ca4dbc0e02db65f274ccc3ca7468dce365a44e
diff --git a/src/object.h b/src/object.h
index 2adee04..efdb424 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1406,11 +1406,8 @@
return !IsPrimitive() && GetSuperClass() == NULL;
}
- // Tests whether an element of type 'object_class' can be
+ // Tests whether a possibly null 'element' can be
// assigned into an array of type 'array_class'.
- static bool CanPutArrayElement(const Class* object_class, const Class* array_class);
- // Like CanPutArrayElement, but throws an exception and
- // unwinds the stack instead of returning false.
static void CanPutArrayElementFromCode(const Object* element, const Class* array_class);
// Given the context of a calling Method, use its DexCache to
@@ -2526,7 +2523,7 @@
// circularity issue during loading the names of its members
DCHECK(IsLoaded() || this == String::GetJavaLangString() ||
this == Field::GetJavaLangReflectField() ||
- this == Method::GetJavaLangReflectMethod());
+ this == Method::GetJavaLangReflectMethod()) << PrettyClass(this);
return GetField32(OFFSET_OF_OBJECT_MEMBER(Class, access_flags_), false);
}