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/runtime.cc | |
parent | 0dea9872082bc3e576ed6cefed86b0d6c0c45ffd (diff) | |
download | art-53b8b09fc80329539585dcf43657bc5f4ecefdff.zip art-53b8b09fc80329539585dcf43657bc5f4ecefdff.tar.gz art-53b8b09fc80329539585dcf43657bc5f4ecefdff.tar.bz2 |
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/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 1555bf2..51edc85 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -42,7 +42,6 @@ #include "image.h" #include "instrumentation.h" #include "intern_table.h" -#include "invoke_arg_array_builder.h" #include "jni_internal.h" #include "mirror/art_field-inl.h" #include "mirror/art_method-inl.h" @@ -54,6 +53,7 @@ #include "monitor.h" #include "parsed_options.h" #include "oat_file.h" +#include "reflection.h" #include "ScopedLocalRef.h" #include "scoped_thread_state_change.h" #include "signal_catcher.h" @@ -316,9 +316,7 @@ jobject CreateSystemClassLoader() { class_loader_class->FindDirectMethod("getSystemClassLoader", "()Ljava/lang/ClassLoader;"); CHECK(getSystemClassLoader != NULL); - JValue result; - ArgArray arg_array(nullptr, 0); - InvokeWithArgArray(soa, getSystemClassLoader, &arg_array, &result, "L"); + JValue result = InvokeWithJValues(soa, nullptr, soa.EncodeMethod(getSystemClassLoader), nullptr); SirtRef<mirror::ClassLoader> class_loader(soa.Self(), down_cast<mirror::ClassLoader*>(result.GetL())); CHECK(class_loader.get() != nullptr); |