From 8689a0a0f266dde073fe7b328c3ceeaa1b23276a Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 4 Apr 2014 09:26:24 +0100 Subject: [PATCH] Explicitly instantiate artInvokeCommon to please analysis tool. Change-Id: I5c078a197c5026e9bd886d0ba1e188054b5ffa75 --- .../quick/quick_trampoline_entrypoints.cc | 33 +++++++++++++++++----- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 9fc173ac2..61ed472c4 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -1634,15 +1634,14 @@ extern "C" uint64_t artQuickGenericJniEndTrampoline(Thread* self, mirror::ArtMet } template -uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, - mirror::ArtMethod* caller_method, - Thread* self, mirror::ArtMethod** sp) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); +static uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, + mirror::ArtMethod* caller_method, + Thread* self, mirror::ArtMethod** sp); template -uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, - mirror::ArtMethod* caller_method, - Thread* self, mirror::ArtMethod** sp) { +static uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, + mirror::ArtMethod* caller_method, + Thread* self, mirror::ArtMethod** sp) { mirror::ArtMethod* method = FindMethodFast(method_idx, this_object, caller_method, access_check, type); if (UNLIKELY(method == nullptr)) { @@ -1682,6 +1681,26 @@ uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, #endif } +// Explicit artInvokeCommon template function declarations to please analysis tool. +#define EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(type, access_check) \ + template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) \ + static uint64_t artInvokeCommon(uint32_t method_idx, \ + mirror::Object* this_object, \ + mirror::ArtMethod* caller_method, \ + Thread* self, mirror::ArtMethod** sp) \ + +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kVirtual, false); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kVirtual, true); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kInterface, false); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kInterface, true); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kDirect, false); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kDirect, true); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kStatic, false); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kStatic, true); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kSuper, false); +EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL(kSuper, true); +#undef EXPLICIT_INVOKE_COMMON_TEMPLATE_DECL + // See comments in runtime_support_asm.S extern "C" uint64_t artInvokeInterfaceTrampolineWithAccessCheck(uint32_t method_idx, -- 2.11.0