summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-21 17:43:44 -0700
committerMathieu Chartier <mathieuc@google.com>2014-06-09 12:46:32 -0700
commitbfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe (patch)
tree3d3f667c8232a9c1bb6fe9daea0d364f9ae01d8c /oatdump
parent2e1ca953c7fb165da36cc26ea74d3045d7e272c8 (diff)
downloadart-bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe.zip
art-bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe.tar.gz
art-bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe.tar.bz2
Change MethodHelper to use a Handle.
Added ConstHandle to help prevent errors where you modify the value stored in the handle of the caller. Also fixed compaction bugs related to not knowing MethodHelper::GetReturnType can resolve types. This bug was present in interpreter RETURN_OBJECT. Bug: 13077697 Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index d51179e..12970fc 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -209,7 +209,6 @@ class OatDumper {
}
const void* GetQuickOatCode(mirror::ArtMethod* m) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- MethodHelper mh(m);
for (size_t i = 0; i < oat_dex_files_.size(); i++) {
const OatFile::OatDexFile* oat_dex_file = oat_dex_files_[i];
CHECK(oat_dex_file != nullptr);
@@ -220,7 +219,7 @@ class OatDumper {
<< "': " << error_msg;
} else {
const DexFile::ClassDef* class_def =
- dex_file->FindClassDef(mh.GetDeclaringClassDescriptor());
+ dex_file->FindClassDef(m->GetDeclaringClassDescriptor());
if (class_def != NULL) {
uint16_t class_def_index = dex_file->GetIndexForClassDef(*class_def);
const OatFile::OatClass oat_class = oat_dex_file->GetOatClass(class_def_index);
@@ -1094,11 +1093,11 @@ class ImageDumper {
}
} else if (method->IsAbstract() || method->IsCalleeSaveMethod() ||
method->IsResolutionMethod() || method->IsImtConflictMethod() ||
- MethodHelper(method).IsClassInitializer()) {
+ method->IsClassInitializer()) {
DCHECK(method->GetNativeGcMap() == NULL) << PrettyMethod(method);
DCHECK(method->GetMappingTable() == NULL) << PrettyMethod(method);
} else {
- const DexFile::CodeItem* code_item = MethodHelper(method).GetCodeItem();
+ const DexFile::CodeItem* code_item = method->GetCodeItem();
size_t dex_instruction_bytes = code_item->insns_size_in_code_units_ * 2;
state->stats_.dex_instruction_bytes += dex_instruction_bytes;