summaryrefslogtreecommitdiffstats
path: root/runtime/native/java_lang_reflect_Array.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2013-10-18 15:42:20 -0700
committerIan Rogers <irogers@google.com>2013-10-20 14:55:26 -0700
commit1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 (patch)
treeb4d4d9b16013ab90fb4b40d23013d7ef44bb5852 /runtime/native/java_lang_reflect_Array.cc
parentb917ea1a62aa0ab8eca3f689ef64b5be34e11abb (diff)
downloadart-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.zip
art-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.tar.gz
art-1eb512d33f94d1dd7ea38263307ba0f7a0dfa653.tar.bz2
Fast JNI support.
Use a modifier to signal a native method is a fast JNI method. If the modifier is set then don't perform runnable transitions. Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
Diffstat (limited to 'runtime/native/java_lang_reflect_Array.cc')
-rw-r--r--runtime/native/java_lang_reflect_Array.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc
index 45ec0ad..a2d6b18 100644
--- a/runtime/native/java_lang_reflect_Array.cc
+++ b/runtime/native/java_lang_reflect_Array.cc
@@ -21,13 +21,13 @@
#include "mirror/class-inl.h"
#include "mirror/object-inl.h"
#include "object_utils.h"
-#include "scoped_thread_state_change.h"
+#include "scoped_fast_native_object_access.h"
#include "sirt_ref.h"
namespace art {
static jobject Array_createMultiArray(JNIEnv* env, jclass, jclass javaElementClass, jobject javaDimArray) {
- ScopedObjectAccess soa(env);
+ ScopedFastNativeObjectAccess soa(env);
DCHECK(javaElementClass != NULL);
mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass);
DCHECK(element_class->IsClass());
@@ -41,7 +41,7 @@ static jobject Array_createMultiArray(JNIEnv* env, jclass, jclass javaElementCla
}
static jobject Array_createObjectArray(JNIEnv* env, jclass, jclass javaElementClass, jint length) {
- ScopedObjectAccess soa(env);
+ ScopedFastNativeObjectAccess soa(env);
DCHECK(javaElementClass != NULL);
mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass);
if (UNLIKELY(length < 0)) {
@@ -63,8 +63,8 @@ static jobject Array_createObjectArray(JNIEnv* env, jclass, jclass javaElementCl
}
static JNINativeMethod gMethods[] = {
- NATIVE_METHOD(Array, createMultiArray, "(Ljava/lang/Class;[I)Ljava/lang/Object;"),
- NATIVE_METHOD(Array, createObjectArray, "(Ljava/lang/Class;I)Ljava/lang/Object;"),
+ NATIVE_METHOD(Array, createMultiArray, "!(Ljava/lang/Class;[I)Ljava/lang/Object;"),
+ NATIVE_METHOD(Array, createObjectArray, "!(Ljava/lang/Class;I)Ljava/lang/Object;"),
};
void register_java_lang_reflect_Array(JNIEnv* env) {