summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/portable
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-12-12 02:15:52 +0100
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2013-12-12 13:08:03 +0100
commit460536209b741bc469f1b0857775449abb2102fb (patch)
tree4bc7f636b86ab2531811827d0fd0c33011a7280e /runtime/entrypoints/portable
parent19031d51ab9edfc3b1996891d654a6b86ca937c0 (diff)
downloadart-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/portable')
-rw-r--r--runtime/entrypoints/portable/portable_invoke_entrypoints.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/entrypoints/portable/portable_invoke_entrypoints.cc b/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
index e2a0cc2..47ccbb1 100644
--- a/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
@@ -22,8 +22,8 @@
namespace art {
template<InvokeType type, bool access_check>
-static mirror::ArtMethod* FindMethodHelper(uint32_t method_idx, mirror::Object* this_object,
- mirror::ArtMethod* caller_method, Thread* thread) {
+mirror::ArtMethod* FindMethodHelper(uint32_t method_idx, mirror::Object* this_object,
+ mirror::ArtMethod* caller_method, Thread* thread) {
mirror::ArtMethod* method = FindMethodFast(method_idx, this_object, caller_method,
access_check, type);
if (UNLIKELY(method == NULL)) {
@@ -46,12 +46,12 @@ static mirror::ArtMethod* FindMethodHelper(uint32_t method_idx, mirror::Object*
}
// Explicit template declarations of FindMethodHelper for all invoke types.
-#define EXPLICIT_FIND_METHOD_HELPER_TEMPLATE_DECL(_type, _access_check) \
- template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) \
- static mirror::ArtMethod* FindMethodHelper<_type, _access_check>(uint32_t method_idx, \
- mirror::Object* this_object, \
- mirror::ArtMethod* caller_method, \
- Thread* thread)
+#define EXPLICIT_FIND_METHOD_HELPER_TEMPLATE_DECL(_type, _access_check) \
+ template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) \
+ mirror::ArtMethod* FindMethodHelper<_type, _access_check>(uint32_t method_idx, \
+ mirror::Object* this_object, \
+ mirror::ArtMethod* caller_method, \
+ Thread* thread)
#define EXPLICIT_FIND_METHOD_HELPER_TYPED_TEMPLATE_DECL(_type) \
EXPLICIT_FIND_METHOD_HELPER_TEMPLATE_DECL(_type, false); \
EXPLICIT_FIND_METHOD_HELPER_TEMPLATE_DECL(_type, true)