From a5b09a67034e57a6e10231dd4bd92f4cb50b824c Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 17 Nov 2016 15:21:22 -0800 Subject: ART: Add dex::TypeIndex Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a --- runtime/openjdkjvmti/transform.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/openjdkjvmti/transform.cc') diff --git a/runtime/openjdkjvmti/transform.cc b/runtime/openjdkjvmti/transform.cc index fa2983c19c..7bb5205f05 100644 --- a/runtime/openjdkjvmti/transform.cc +++ b/runtime/openjdkjvmti/transform.cc @@ -33,6 +33,7 @@ #include "class_linker.h" #include "dex_file.h" +#include "dex_file_types.h" #include "gc_root-inl.h" #include "globals.h" #include "jni_env_ext-inl.h" @@ -108,10 +109,10 @@ static void InvalidateExistingMethods(art::Thread* self, // Find the code_item for the method then find the dex_method_index and dex_code_item_offset to // set. const art::DexFile::StringId* new_name_id = dex_file->FindStringId(method.GetName()); - uint16_t method_return_idx = + art::dex::TypeIndex method_return_idx = dex_file->GetIndexForTypeId(*dex_file->FindTypeId(method.GetReturnTypeDescriptor())); const auto* old_type_list = method.GetParameterTypeList(); - std::vector new_type_list; + std::vector new_type_list; for (uint32_t i = 0; old_type_list != nullptr && i < old_type_list->Size(); i++) { new_type_list.push_back( dex_file->GetIndexForTypeId( -- cgit v1.2.3-59-g8ed1b