diff options
author | Andreas Gampe <agampe@google.com> | 2014-03-14 07:52:20 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-03-14 07:52:20 -0700 |
commit | 9a6a99aaac2e4c973e0bc71075f196b8b084100f (patch) | |
tree | ec82d1b0a85232f98dad95ade6120c63160e1347 /runtime/entrypoints/quick | |
parent | ba3c292374282b658ddfd188a8bba565240036a0 (diff) | |
download | art-9a6a99aaac2e4c973e0bc71075f196b8b084100f.zip art-9a6a99aaac2e4c973e0bc71075f196b8b084100f.tar.gz art-9a6a99aaac2e4c973e0bc71075f196b8b084100f.tar.bz2 |
Remove small duplicate code in Generic JNI handling, add comments
Change-Id: Ib276fa63b6a00480eaaff6c352d37917c61e966c
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index a4491d4..36dc1cb 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -1498,7 +1498,11 @@ extern "C" ssize_t artQuickGenericJniTrampoline(Thread* self, mirror::ArtMethod* // Retrieve the stored native code. const void* nativeCode = called->GetNativeMethod(); - // Check whether it's the stub to retrieve the native code, we should call that directly. + // There are two cases for the content of nativeCode: + // 1) Pointer to the native function. + // 2) Pointer to the trampoline for native code binding. + // In the second case, we need to execute the binding and continue with the actual native function + // pointer. DCHECK(nativeCode != nullptr); if (nativeCode == GetJniDlsymLookupStub()) { nativeCode = artFindNativeMethod(); |