diff options
author | Andreas Gampe <agampe@google.com> | 2014-09-11 08:30:08 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-09-15 19:50:12 -0700 |
commit | 5a4b8a236030460651a3136397d23ca6744e7eb7 (patch) | |
tree | 0e43891398e416d3fa77c7de391bf4db4408e8ee /runtime/method_helper-inl.h | |
parent | 19f7c95491a053b818f914137fa73df0517b8792 (diff) | |
download | android_art-5a4b8a236030460651a3136397d23ca6744e7eb7.tar.gz android_art-5a4b8a236030460651a3136397d23ca6744e7eb7.tar.bz2 android_art-5a4b8a236030460651a3136397d23ca6744e7eb7.zip |
ART: Rename Handle hierarchy
Bring the names in line with normal OO principles: ConstHandle
becomes Handle, and Handle becomes MutableHandle.
Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
Diffstat (limited to 'runtime/method_helper-inl.h')
-rw-r--r-- | runtime/method_helper-inl.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/method_helper-inl.h b/runtime/method_helper-inl.h index 9af835ff70..143f4bc9bb 100644 --- a/runtime/method_helper-inl.h +++ b/runtime/method_helper-inl.h @@ -26,7 +26,9 @@ namespace art { -inline bool MethodHelper::HasSameNameAndSignature(MethodHelper* other) { +template <template <class T> class HandleKind> +template <template <class T2> class HandleKind2> +inline bool MethodHelperT<HandleKind>::HasSameNameAndSignature(MethodHelperT<HandleKind2>* other) { const DexFile* dex_file = method_->GetDexFile(); const DexFile::MethodId& mid = dex_file->GetMethodId(GetMethod()->GetDexMethodIndex()); if (method_->GetDexCache() == other->method_->GetDexCache()) { @@ -43,7 +45,9 @@ inline bool MethodHelper::HasSameNameAndSignature(MethodHelper* other) { return dex_file->GetMethodSignature(mid) == other_dex_file->GetMethodSignature(other_mid); } -inline mirror::Class* MethodHelper::GetClassFromTypeIdx(uint16_t type_idx, bool resolve) { +template <template <class T> class HandleKind> +inline mirror::Class* MethodHelperT<HandleKind>::GetClassFromTypeIdx(uint16_t type_idx, + bool resolve) { mirror::ArtMethod* method = GetMethod(); mirror::Class* type = method->GetDexCacheResolvedType(type_idx); if (type == nullptr && resolve) { @@ -53,7 +57,8 @@ inline mirror::Class* MethodHelper::GetClassFromTypeIdx(uint16_t type_idx, bool return type; } -inline mirror::Class* MethodHelper::GetReturnType(bool resolve) { +template <template <class T> class HandleKind> +inline mirror::Class* MethodHelperT<HandleKind>::GetReturnType(bool resolve) { mirror::ArtMethod* method = GetMethod(); const DexFile* dex_file = method->GetDexFile(); const DexFile::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex()); @@ -62,7 +67,8 @@ inline mirror::Class* MethodHelper::GetReturnType(bool resolve) { return GetClassFromTypeIdx(return_type_idx, resolve); } -inline mirror::String* MethodHelper::ResolveString(uint32_t string_idx) { +template <template <class T> class HandleKind> +inline mirror::String* MethodHelperT<HandleKind>::ResolveString(uint32_t string_idx) { mirror::ArtMethod* method = GetMethod(); mirror::String* s = method->GetDexCacheStrings()->Get(string_idx); if (UNLIKELY(s == nullptr)) { |