diff options
author | Andreas Gampe <agampe@google.com> | 2014-02-27 12:26:20 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-03-03 23:27:12 +0000 |
commit | 2da882315a61072664f7ce3c212307342e907207 (patch) | |
tree | 67d777be044f5b60e2f13ab7968b63c581904ea9 /runtime/entrypoints | |
parent | 762d4e5b9e777ae64c4ba581af9c84b78a5e96a6 (diff) | |
download | art-2da882315a61072664f7ce3c212307342e907207.zip art-2da882315a61072664f7ce3c212307342e907207.tar.gz art-2da882315a61072664f7ce3c212307342e907207.tar.bz2 |
Initial changes towards Generic JNI option
Some initial changes that lead to an UNIMPLEMENTED. Works
by not compiling for JNI right now and tracking native methods
which have neither quick nor portable code. Uses new trampoline.
Change-Id: I5448654044eb2717752fd7359f4ef8bd5c17be6e
Diffstat (limited to 'runtime/entrypoints')
-rw-r--r-- | runtime/entrypoints/entrypoint_utils.h | 9 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_entrypoints.h | 1 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index 2ced942..a8fb6c1 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -733,6 +733,11 @@ static inline const void* GetQuickToInterpreterBridge() { return reinterpret_cast<void*>(art_quick_to_interpreter_bridge); } +extern "C" void art_quick_generic_jni_trampoline(mirror::ArtMethod*); +static inline const void* GetQuickGenericJniTrampoline() { + return reinterpret_cast<void*>(art_quick_generic_jni_trampoline); +} + static inline const void* GetQuickToPortableBridge() { // TODO: quick to portable bridge. Bug: 8196384 return GetQuickToInterpreterBridge(); @@ -754,6 +759,10 @@ static inline const void* GetQuickImtConflictTrampoline(ClassLinker* class_linke return class_linker->GetQuickImtConflictTrampoline(); } +static inline const void* GetQuickGenericJniTrampoline(ClassLinker* class_linker) { + return class_linker->GetQuickGenericJniTrampoline(); +} + extern "C" void art_portable_proxy_invoke_handler(); static inline const void* GetPortableProxyInvokeHandler() { return reinterpret_cast<void*>(art_portable_proxy_invoke_handler); diff --git a/runtime/entrypoints/quick/quick_entrypoints.h b/runtime/entrypoints/quick/quick_entrypoints.h index 011e926..5c3b824 100644 --- a/runtime/entrypoints/quick/quick_entrypoints.h +++ b/runtime/entrypoints/quick/quick_entrypoints.h @@ -87,6 +87,7 @@ struct PACKED(4) QuickEntryPoints { mirror::Object* (*pJniMethodEndWithReference)(jobject result, uint32_t cookie, Thread* self); mirror::Object* (*pJniMethodEndWithReferenceSynchronized)(jobject result, uint32_t cookie, jobject locked, Thread* self); + void (*pQuickGenericJniTrampoline)(mirror::ArtMethod*); // Locks void (*pLockObject)(void*); diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 5339b5e..ef40be8 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -817,4 +817,13 @@ extern "C" const void* artQuickResolutionTrampoline(mirror::ArtMethod* called, return code; } +extern "C" const void* artQuickGenericJniTrampoline(mirror::ArtMethod* called, + mirror::Object* receiver, + Thread* thread, mirror::ArtMethod** sp) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + LOG(FATAL) << "artQuickGenericJniTrampoline not implemented: " + << PrettyMethod(called); + return NULL; +} + } // namespace art |