diff options
author | Andreas Gampe <agampe@google.com> | 2016-11-17 15:21:22 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2016-11-21 10:57:00 -0800 |
commit | a5b09a67034e57a6e10231dd4bd92f4cb50b824c (patch) | |
tree | 304be738f4fa528b7ad2676103eecc84c79eaeeb /runtime/openjdkjvmti/transform.cc | |
parent | dac7ad17c78387d15d7aefae0f852dddf5f37e34 (diff) |
ART: Add dex::TypeIndex
Add abstraction for uint16_t type index.
Test: m test-art-host
Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
Diffstat (limited to 'runtime/openjdkjvmti/transform.cc')
-rw-r--r-- | runtime/openjdkjvmti/transform.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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<uint16_t> new_type_list; + std::vector<art::dex::TypeIndex> 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( |