From a0485607a4a4d8c683a9849f6f20902c4e1da7a4 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 2 Dec 2014 15:48:04 -0800 Subject: Move GetClassFromTypeIdx to ArtMethod. Move GetClassFromTypeIdx out of MethodHelper into ArtMethod in preparation for the removal of MethodHelper. Change-Id: I9c03dd8c821944c606ea08cdf92afc80c4275247 --- runtime/interpreter/interpreter_common.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'runtime/interpreter/interpreter_common.cc') diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index 041650f150..3c7db85395 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -538,16 +538,6 @@ void AbortTransaction(Thread* self, const char* fmt, ...) { va_end(args); } -static mirror::Class* GetClassFromTypeIdx(mirror::ArtMethod* method, uint16_t type_idx) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { - mirror::Class* type = method->GetDexCacheResolvedType(type_idx); - if (type == nullptr) { - type = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, method); - CHECK(type != nullptr || Thread::Current()->IsExceptionPending()); - } - return type; -} - template bool DoCall(ArtMethod* called_method, Thread* self, ShadowFrame& shadow_frame, const Instruction* inst, uint16_t inst_data, JValue* result) { @@ -610,8 +600,9 @@ bool DoCall(ArtMethod* called_method, Thread* self, ShadowFrame& shadow_frame, case 'L': { Object* o = shadow_frame.GetVRegReference(src_reg); if (do_assignability_check && o != NULL) { - Class* arg_type = GetClassFromTypeIdx(new_shadow_frame->GetMethod(), - params->GetTypeItem(shorty_pos).type_idx_); + Class* arg_type = + new_shadow_frame->GetMethod()->GetClassFromTypeIndex( + params->GetTypeItem(shorty_pos).type_idx_, true); if (arg_type == NULL) { CHECK(self->IsExceptionPending()); return false; -- cgit v1.2.3-59-g8ed1b