diff options
| author | Andreas Gampe <agampe@google.com> | 2018-12-28 09:39:56 -0800 |
|---|---|---|
| committer | Andreas Gampe <agampe@google.com> | 2019-01-02 10:32:25 -0800 |
| commit | 3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf (patch) | |
| tree | 365d20ad6b68ff1dbd4903764b63880324136e4d /runtime/imtable-inl.h | |
| parent | 0f0a4e40667c87fbd4ae5480eddbfd701bfabfa2 (diff) | |
| download | art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.gz art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.bz2 art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.zip | |
ART: Move dex structs into own header
Separating out the structs from DexFile allows them to be forward-
declared, which reduces the need to include the dex_file header.
Bug: 119869270
Test: m
Change-Id: I32dde5a632884bca7435cd584b4a81883de2e7b4
Diffstat (limited to 'runtime/imtable-inl.h')
| -rw-r--r-- | runtime/imtable-inl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/imtable-inl.h b/runtime/imtable-inl.h index 93346f6151..21e3eb1f23 100644 --- a/runtime/imtable-inl.h +++ b/runtime/imtable-inl.h @@ -46,7 +46,7 @@ inline void ImTable::GetImtHashComponents(ArtMethod* method, } const DexFile* dex_file = method->GetDexFile(); - const DexFile::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex()); + const dex::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex()); // Class descriptor for the class component. *class_hash = ComputeModifiedUtf8Hash(dex_file->GetMethodDeclaringClassDescriptor(method_id)); @@ -54,7 +54,7 @@ inline void ImTable::GetImtHashComponents(ArtMethod* method, // Method name for the method component. *name_hash = ComputeModifiedUtf8Hash(dex_file->GetMethodName(method_id)); - const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); + const dex::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); // Read the proto for the signature component. uint32_t tmp = ComputeModifiedUtf8Hash( @@ -63,10 +63,10 @@ inline void ImTable::GetImtHashComponents(ArtMethod* method, // Mix in the argument types. // Note: we could consider just using the shorty. This would be faster, at the price of // potential collisions. - const DexFile::TypeList* param_types = dex_file->GetProtoParameters(proto_id); + const dex::TypeList* param_types = dex_file->GetProtoParameters(proto_id); if (param_types != nullptr) { for (size_t i = 0; i != param_types->Size(); ++i) { - const DexFile::TypeItem& type = param_types->GetTypeItem(i); + const dex::TypeItem& type = param_types->GetTypeItem(i); tmp = 31 * tmp + ComputeModifiedUtf8Hash( dex_file->GetTypeDescriptor(dex_file->GetTypeId(type.type_idx_))); } |
