summaryrefslogtreecommitdiff
path: root/runtime/art_method.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r--runtime/art_method.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 5f5361aed8..e273d94623 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -31,6 +31,7 @@
#include "dex/dex_file-inl.h"
#include "dex/dex_file_exception_helpers.h"
#include "dex/dex_instruction.h"
+#include "dex/signature-inl.h"
#include "entrypoints/runtime_asm_entrypoints.h"
#include "gc/accounting/card_table-inl.h"
#include "hidden_api.h"
@@ -133,7 +134,7 @@ uint16_t ArtMethod::FindObsoleteDexClassDefIndex() {
DCHECK(IsObsolete());
const DexFile* dex_file = GetDexFile();
const dex::TypeIndex declaring_class_type = dex_file->GetMethodId(GetDexMethodIndex()).class_idx_;
- const DexFile::ClassDef* class_def = dex_file->FindClassDef(declaring_class_type);
+ const dex::ClassDef* class_def = dex_file->FindClassDef(declaring_class_type);
CHECK(class_def != nullptr);
return dex_file->GetIndexForClassDef(*class_def);
}
@@ -182,14 +183,14 @@ size_t ArtMethod::NumArgRegisters(const StringPiece& shorty) {
bool ArtMethod::HasSameNameAndSignature(ArtMethod* other) {
ScopedAssertNoThreadSuspension ants("HasSameNameAndSignature");
const DexFile* dex_file = GetDexFile();
- const DexFile::MethodId& mid = dex_file->GetMethodId(GetDexMethodIndex());
+ const dex::MethodId& mid = dex_file->GetMethodId(GetDexMethodIndex());
if (GetDexCache() == other->GetDexCache()) {
- const DexFile::MethodId& mid2 = dex_file->GetMethodId(other->GetDexMethodIndex());
+ const dex::MethodId& mid2 = dex_file->GetMethodId(other->GetDexMethodIndex());
return mid.name_idx_ == mid2.name_idx_ && mid.proto_idx_ == mid2.proto_idx_;
}
const DexFile* dex_file2 = other->GetDexFile();
- const DexFile::MethodId& mid2 = dex_file2->GetMethodId(other->GetDexMethodIndex());
- if (!DexFileStringEquals(dex_file, mid.name_idx_, dex_file2, mid2.name_idx_)) {
+ const dex::MethodId& mid2 = dex_file2->GetMethodId(other->GetDexMethodIndex());
+ if (!DexFile::StringEquals(dex_file, mid.name_idx_, dex_file2, mid2.name_idx_)) {
return false; // Name mismatch.
}
return dex_file->GetMethodSignature(mid) == dex_file2->GetMethodSignature(mid2);
@@ -235,17 +236,17 @@ uint32_t ArtMethod::FindDexMethodIndexInOtherDexFile(const DexFile& other_dexfil
uint32_t name_and_signature_idx) {
const DexFile* dexfile = GetDexFile();
const uint32_t dex_method_idx = GetDexMethodIndex();
- const DexFile::MethodId& mid = dexfile->GetMethodId(dex_method_idx);
- const DexFile::MethodId& name_and_sig_mid = other_dexfile.GetMethodId(name_and_signature_idx);
+ const dex::MethodId& mid = dexfile->GetMethodId(dex_method_idx);
+ const dex::MethodId& name_and_sig_mid = other_dexfile.GetMethodId(name_and_signature_idx);
DCHECK_STREQ(dexfile->GetMethodName(mid), other_dexfile.GetMethodName(name_and_sig_mid));
DCHECK_EQ(dexfile->GetMethodSignature(mid), other_dexfile.GetMethodSignature(name_and_sig_mid));
if (dexfile == &other_dexfile) {
return dex_method_idx;
}
const char* mid_declaring_class_descriptor = dexfile->StringByTypeIdx(mid.class_idx_);
- const DexFile::TypeId* other_type_id = other_dexfile.FindTypeId(mid_declaring_class_descriptor);
+ const dex::TypeId* other_type_id = other_dexfile.FindTypeId(mid_declaring_class_descriptor);
if (other_type_id != nullptr) {
- const DexFile::MethodId* other_mid = other_dexfile.FindMethodId(
+ const dex::MethodId* other_mid = other_dexfile.FindMethodId(
*other_type_id, other_dexfile.GetStringId(name_and_sig_mid.name_idx_),
other_dexfile.GetProtoId(name_and_sig_mid.proto_idx_));
if (other_mid != nullptr) {
@@ -447,11 +448,11 @@ static const OatFile::OatMethod FindOatMethodFromDexFileFor(ArtMethod* method, b
// recreate the class_def_index from the descriptor.
std::string descriptor_storage;
- const DexFile::TypeId* declaring_class_type_id =
+ const dex::TypeId* declaring_class_type_id =
dex_file->FindTypeId(method->GetDeclaringClass()->GetDescriptor(&descriptor_storage));
CHECK(declaring_class_type_id != nullptr);
dex::TypeIndex declaring_class_type_index = dex_file->GetIndexForTypeId(*declaring_class_type_id);
- const DexFile::ClassDef* declaring_class_type_def =
+ const dex::ClassDef* declaring_class_type_def =
dex_file->FindClassDef(declaring_class_type_index);
CHECK(declaring_class_type_def != nullptr);
uint16_t declaring_class_def_index = dex_file->GetIndexForClassDef(*declaring_class_type_def);
@@ -522,7 +523,7 @@ bool ArtMethod::EqualParameters(Handle<mirror::ObjectArray<mirror::Class>> param
auto* dex_file = dex_cache->GetDexFile();
const auto& method_id = dex_file->GetMethodId(GetDexMethodIndex());
const auto& proto_id = dex_file->GetMethodPrototype(method_id);
- const DexFile::TypeList* proto_params = dex_file->GetProtoParameters(proto_id);
+ const dex::TypeList* proto_params = dex_file->GetProtoParameters(proto_id);
auto count = proto_params != nullptr ? proto_params->Size() : 0u;
auto param_len = params != nullptr ? params->GetLength() : 0u;
if (param_len != count) {