ART: Verifier cleanup
Start making the method verifier more independent of externalities.
This will be implemented as incremental changes.
Reorder impl::MethodVerifier's constructor arguments to have all
superclass arguments first. In an effort to simplify additions.
Test: m test-art-host
Change-Id: Iba119d74b0dd2dc8c4831efa823c191df6975d9d
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 5d8b67b..d6746aa 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -154,20 +154,20 @@
ClassLinker* class_linker,
ArenaPool* arena_pool,
const DexFile* dex_file,
+ const dex::CodeItem* code_item,
+ uint32_t method_idx,
+ bool can_load_classes,
+ bool allow_thread_suspension,
+ bool allow_soft_failures,
+ bool aot_mode,
Handle<mirror::DexCache> dex_cache,
Handle<mirror::ClassLoader> class_loader,
const dex::ClassDef& class_def,
- const dex::CodeItem* code_item,
- uint32_t method_idx,
ArtMethod* method,
uint32_t access_flags,
- bool can_load_classes,
- bool allow_soft_failures,
bool need_precise_constants,
bool verify_to_dump,
- bool allow_thread_suspension,
bool fill_register_lines,
- bool aot_mode,
uint32_t api_level) REQUIRES_SHARED(Locks::mutator_lock_)
: art::verifier::MethodVerifier(self,
class_linker,
@@ -5182,20 +5182,20 @@
class_linker,
arena_pool,
dex_file,
+ code_item,
+ method_idx,
+ /* can_load_classes= */ true,
+ /* allow_thread_suspension= */ true,
+ allow_soft_failures,
+ aot_mode,
dex_cache,
class_loader,
class_def,
- code_item,
- method_idx,
method,
method_access_flags,
- /* can_load_classes= */ true,
- allow_soft_failures,
need_precise_constants,
/* verify to dump */ false,
- /* allow_thread_suspension= */ true,
/* fill_register_lines= */ false,
- aot_mode,
api_level);
if (verifier.Verify()) {
// Verification completed, however failures may be pending that didn't cause the verification
@@ -5329,20 +5329,20 @@
Runtime::Current()->GetClassLinker(),
Runtime::Current()->GetArenaPool(),
method->GetDexFile(),
+ method->GetCodeItem(),
+ method->GetDexMethodIndex(),
+ /* can_load_classes= */ false,
+ /* allow_thread_suspension= */ false,
+ /* allow_soft_failures= */ true,
+ Runtime::Current()->IsAotCompiler(),
dex_cache,
class_loader,
*method->GetDeclaringClass()->GetClassDef(),
- method->GetCodeItem(),
- method->GetDexMethodIndex(),
method,
method->GetAccessFlags(),
- /* can_load_classes= */ false,
- /* allow_soft_failures= */ true,
/* need_precise_constants= */ true,
/* verify_to_dump= */ false,
- /* allow_thread_suspension= */ false,
/* fill_register_lines= */ true,
- Runtime::Current()->IsAotCompiler(),
// Just use the verifier at the current skd-version.
// This might affect what soft-verifier errors are reported.
// Callers can then filter out relevant errors if needed.
@@ -5376,20 +5376,20 @@
Runtime::Current()->GetClassLinker(),
Runtime::Current()->GetArenaPool(),
dex_file,
+ code_item,
+ dex_method_idx,
+ /* can_load_classes= */ true,
+ /* allow_thread_suspension= */ true,
+ /* allow_soft_failures= */ true,
+ Runtime::Current()->IsAotCompiler(),
dex_cache,
class_loader,
class_def,
- code_item,
- dex_method_idx,
method,
method_access_flags,
- /* can_load_classes= */ true,
- /* allow_soft_failures= */ true,
/* need_precise_constants= */ true,
/* verify_to_dump= */ true,
- /* allow_thread_suspension= */ true,
/* fill_register_lines= */ false,
- Runtime::Current()->IsAotCompiler(),
api_level);
verifier->Verify();
verifier->DumpFailures(vios->Stream());
@@ -5417,20 +5417,20 @@
Runtime::Current()->GetClassLinker(),
Runtime::Current()->GetArenaPool(),
m->GetDexFile(),
+ m->GetCodeItem(),
+ m->GetDexMethodIndex(),
+ /* can_load_classes= */ false,
+ /* allow_thread_suspension= */ false,
+ /* allow_soft_failures= */ true,
+ Runtime::Current()->IsAotCompiler(),
dex_cache,
class_loader,
m->GetClassDef(),
- m->GetCodeItem(),
- m->GetDexMethodIndex(),
m,
m->GetAccessFlags(),
- /* can_load_classes= */ false,
- /* allow_soft_failures= */ true,
/* need_precise_constants= */ false,
/* verify_to_dump= */ false,
- /* allow_thread_suspension= */ false,
/* fill_register_lines= */ false,
- Runtime::Current()->IsAotCompiler(),
api_level);
verifier.interesting_dex_pc_ = dex_pc;
verifier.monitor_enter_dex_pcs_ = monitor_enter_dex_pcs;
@@ -5456,20 +5456,20 @@
Runtime::Current()->GetClassLinker(),
Runtime::Current()->GetArenaPool(),
dex_file,
+ code_item,
+ method_idx,
+ can_load_classes,
+ allow_thread_suspension,
+ allow_soft_failures,
+ Runtime::Current()->IsAotCompiler(),
dex_cache,
class_loader,
class_def,
- code_item,
- method_idx,
method,
access_flags,
- can_load_classes,
- allow_soft_failures,
need_precise_constants,
verify_to_dump,
- allow_thread_suspension,
/* fill_register_lines= */ false,
- Runtime::Current()->IsAotCompiler(),
api_level);
}