Refactor reflective method invocation.
Move invocation code out of JNI internal into reflection, including ArgArray
code. Make reflective invocation use the ArgArray to build arguments rather
than allocating a jvalue[] and unboxing arguments into that.
Move reflection part of jni_internal_test into reflection_test.
Make greater use of fast JNI.
Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
diff --git a/runtime/thread.h b/runtime/thread.h
index 264a927..fdf976d 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -398,8 +398,9 @@
// StackTraceElement[]. If output_array is NULL, a new array is created, otherwise as many
// frames as will fit are written into the given array. If stack_depth is non-NULL, it's updated
// with the number of valid frames in the returned array.
- static jobjectArray InternalStackTraceToStackTraceElementArray(JNIEnv* env, jobject internal,
- jobjectArray output_array = NULL, int* stack_depth = NULL);
+ static jobjectArray InternalStackTraceToStackTraceElementArray(const ScopedObjectAccess& soa,
+ jobject internal, jobjectArray output_array = nullptr, int* stack_depth = nullptr)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
void VisitRoots(RootCallback* visitor, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);