From 038924b75f06b91c2a7e944196ca11f118ce182f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 19 Feb 2019 15:09:35 +0000 Subject: ART: Reduce dependencies on CompilerDriver. Preparation for moving CompilerDriver and other stuff from libart-compiler.so to dex2oat. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ic221ebca4b8c79dd1549316921ace655f2e3f0fe --- compiler/driver/compiler_driver.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index f39d8fc896..e9a3d550d9 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -258,7 +258,7 @@ CompilerDriver::CompilerDriver( size_t thread_count, int swap_fd) : compiler_options_(compiler_options), - compiler_(Compiler::Create(this, compiler_kind)), + compiler_(), compiler_kind_(compiler_kind), number_of_soft_verifier_failures_(0), had_hard_verifier_failure_(false), @@ -269,9 +269,8 @@ CompilerDriver::CompilerDriver( dex_to_dex_compiler_(this) { DCHECK(compiler_options_ != nullptr); - compiler_->Init(); - compiled_method_storage_.SetDedupeEnabled(compiler_options_->DeduplicateCode()); + compiler_.reset(Compiler::Create(*compiler_options, &compiled_method_storage_, compiler_kind)); } CompilerDriver::~CompilerDriver() { @@ -281,7 +280,6 @@ CompilerDriver::~CompilerDriver() { CompiledMethod::ReleaseSwapAllocatedCompiledMethod(GetCompiledMethodStorage(), method); } }); - compiler_->UnInit(); } -- cgit v1.2.3-59-g8ed1b