diff options
author | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-12-12 02:15:52 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-12-12 13:08:03 +0100 |
commit | 460536209b741bc469f1b0857775449abb2102fb (patch) | |
tree | 4bc7f636b86ab2531811827d0fd0c33011a7280e /runtime/entrypoints/quick | |
parent | 19031d51ab9edfc3b1996891d654a6b86ca937c0 (diff) | |
download | art-460536209b741bc469f1b0857775449abb2102fb.zip art-460536209b741bc469f1b0857775449abb2102fb.tar.gz art-460536209b741bc469f1b0857775449abb2102fb.tar.bz2 |
Don't rely on gcc extensions
Make the code more compatible with different compilers.
clang doesn't allow extra static qualifiers on template
specializations, const qualifiers on function types,
or inline attributes on lambda functions, and is more
picky about casting away constness with reinterpret_cast.
These modifications are compatible with both gcc and
clang.
Change-Id: I739b10df2780bec537827a13679fd2bcc2cc7188
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_invoke_entrypoints.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/entrypoints/quick/quick_invoke_entrypoints.cc b/runtime/entrypoints/quick/quick_invoke_entrypoints.cc index b852a32..5a1b3e8 100644 --- a/runtime/entrypoints/quick/quick_invoke_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_invoke_entrypoints.cc @@ -142,9 +142,9 @@ extern "C" uint64_t artInvokeInterfaceTrampoline(mirror::ArtMethod* interface_me } template<InvokeType type, bool access_check> -static uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object, - mirror::ArtMethod* caller_method, - Thread* self, mirror::ArtMethod** sp) { +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 == NULL)) { @@ -174,12 +174,12 @@ static uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object } // Explicit template declarations of artInvokeCommon for all invoke types. -#define EXPLICIT_ART_INVOKE_COMMON_TEMPLATE_DECL(_type, _access_check) \ - template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) \ - static uint64_t artInvokeCommon<_type, _access_check>(uint32_t method_idx, \ - mirror::Object* this_object, \ - mirror::ArtMethod* caller_method, \ - Thread* self, mirror::ArtMethod** sp) +#define EXPLICIT_ART_INVOKE_COMMON_TEMPLATE_DECL(_type, _access_check) \ + template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) \ + uint64_t artInvokeCommon<_type, _access_check>(uint32_t method_idx, \ + mirror::Object* this_object, \ + mirror::ArtMethod* caller_method, \ + Thread* self, mirror::ArtMethod** sp) #define EXPLICIT_ART_INVOKE_COMMON_TYPED_TEMPLATE_DECL(_type) \ EXPLICIT_ART_INVOKE_COMMON_TEMPLATE_DECL(_type, false); \ |