Code cleanup around vdex.
1) Handle the vdex in dex2oat instead of compiler_driver
2) CHECK instead of DCHECK that we don't dexlayout with vdex.
Test: test.py
Change-Id: Idf7be59bb25708181e391d17128480659ac697e5
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 91b58e1..2330b9a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -425,26 +425,6 @@
FreeThreadPools();
}
-void CompilerDriver::CompileAll(jobject class_loader,
- const std::vector<const DexFile*>& dex_files,
- VdexFile* vdex_file,
- TimingLogger* timings) {
- if (vdex_file != nullptr) {
- // TODO: we unquicken unconditionnally, as we don't know
- // if the boot image has changed. How exactly we'll know is under
- // experimentation.
- TimingLogger::ScopedTiming t("Unquicken", timings);
- // We do not decompile a RETURN_VOID_NO_BARRIER into a RETURN_VOID, as the quickening
- // optimization does not depend on the boot image (the optimization relies on not
- // having final fields in a class, which does not change for an app).
- VdexFile::Unquicken(dex_files, vdex_file->GetQuickeningInfo());
-
- Runtime::Current()->GetCompilerCallbacks()->SetVerifierDeps(
- new verifier::VerifierDeps(dex_files, vdex_file->GetVerifierDepsData()));
- }
- CompileAll(class_loader, dex_files, timings);
-}
-
static optimizer::DexToDexCompilationLevel GetDexToDexCompilationLevel(
Thread* self, const CompilerDriver& driver, Handle<mirror::ClassLoader> class_loader,
const DexFile& dex_file, const DexFile::ClassDef& class_def)
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 38e7d2c..69f7b1b 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -119,12 +119,6 @@
TimingLogger* timings)
REQUIRES(!Locks::mutator_lock_, !compiled_classes_lock_, !dex_to_dex_references_lock_);
- void CompileAll(jobject class_loader,
- const std::vector<const DexFile*>& dex_files,
- VdexFile* vdex_file,
- TimingLogger* timings)
- REQUIRES(!Locks::mutator_lock_, !compiled_classes_lock_, !dex_to_dex_references_lock_);
-
// Compile a single Method.
void CompileOne(Thread* self, ArtMethod* method, TimingLogger* timings)
REQUIRES_SHARED(Locks::mutator_lock_)
diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
index 4b979d8..1329fdd 100644
--- a/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -42,10 +42,7 @@
void CompileAll(jobject class_loader) REQUIRES(!Locks::mutator_lock_) {
TimingLogger timings("CompilerDriverTest::CompileAll", false, false);
TimingLogger::ScopedTiming t(__FUNCTION__, &timings);
- compiler_driver_->CompileAll(class_loader,
- GetDexFiles(class_loader),
- /* verifier_deps */ nullptr,
- &timings);
+ compiler_driver_->CompileAll(class_loader, GetDexFiles(class_loader), &timings);
t.NewTiming("MakeAllExecutable");
MakeAllExecutable(class_loader);
}