diff options
author | Ian Rogers <irogers@google.com> | 2014-03-13 23:45:53 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-03-14 11:28:10 -0700 |
commit | 53b8b09fc80329539585dcf43657bc5f4ecefdff (patch) | |
tree | cac0f82fbb89bd907104e3fed6c36203e11a3de0 /runtime/native/java_lang_Thread.cc | |
parent | 0dea9872082bc3e576ed6cefed86b0d6c0c45ffd (diff) |
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
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r-- | runtime/native/java_lang_Thread.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc index 2665a08ab0..de1b593c01 100644 --- a/runtime/native/java_lang_Thread.cc +++ b/runtime/native/java_lang_Thread.cc @@ -38,7 +38,7 @@ static jboolean Thread_interrupted(JNIEnv* env, jclass) { } static jboolean Thread_isInterrupted(JNIEnv* env, jobject java_thread) { - ScopedObjectAccess soa(env); + ScopedFastNativeObjectAccess soa(env); MutexLock mu(soa.Self(), *Locks::thread_list_lock_); Thread* thread = Thread::FromManagedThread(soa, java_thread); return (thread != NULL) ? thread->IsInterrupted() : JNI_FALSE; @@ -170,8 +170,8 @@ static void Thread_yield(JNIEnv*, jobject) { static JNINativeMethod gMethods[] = { NATIVE_METHOD(Thread, currentThread, "!()Ljava/lang/Thread;"), - NATIVE_METHOD(Thread, interrupted, "()Z"), - NATIVE_METHOD(Thread, isInterrupted, "()Z"), + NATIVE_METHOD(Thread, interrupted, "!()Z"), + NATIVE_METHOD(Thread, isInterrupted, "!()Z"), NATIVE_METHOD(Thread, nativeCreate, "(Ljava/lang/Thread;JZ)V"), NATIVE_METHOD(Thread, nativeGetStatus, "(Z)I"), NATIVE_METHOD(Thread, nativeHoldsLock, "(Ljava/lang/Object;)Z"), |