diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/common_compiler_test.cc | 4 | ||||
| -rw-r--r-- | compiler/dex/dex_to_dex_decompiler_test.cc | 2 | ||||
| -rw-r--r-- | compiler/driver/compiler_options.cc | 3 | ||||
| -rw-r--r-- | compiler/driver/compiler_options.h | 17 | ||||
| -rw-r--r-- | compiler/verifier_deps_test.cc | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 599f4aa189..66421e2562 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -184,7 +184,7 @@ void CommonCompilerTest::OverrideInstructionSetFeatures(InstructionSet instructi void CommonCompilerTest::CreateCompilerDriver() { ApplyInstructionSet(); - compiler_options_->boot_image_ = true; + compiler_options_->image_type_ = CompilerOptions::ImageType::kBootImage; compiler_options_->compile_pic_ = false; // Non-PIC boot image is a test configuration. compiler_options_->SetCompilerFilter(GetCompilerFilter()); compiler_options_->image_classes_.swap(*GetImageClasses()); @@ -345,7 +345,7 @@ void CommonCompilerTest::SetDexFilesForOatFile(const std::vector<const DexFile*> } void CommonCompilerTest::ClearBootImageOption() { - compiler_options_->boot_image_ = false; + compiler_options_->image_type_ = CompilerOptions::ImageType::kNone; } } // namespace art diff --git a/compiler/dex/dex_to_dex_decompiler_test.cc b/compiler/dex/dex_to_dex_decompiler_test.cc index 4f83d605a3..f61e6c4848 100644 --- a/compiler/dex/dex_to_dex_decompiler_test.cc +++ b/compiler/dex/dex_to_dex_decompiler_test.cc @@ -41,7 +41,7 @@ class DexToDexDecompilerTest : public CommonCompilerTest { void CompileAll(jobject class_loader) REQUIRES(!Locks::mutator_lock_) { TimingLogger timings("CompilerDriverTest::CompileAll", false, false); TimingLogger::ScopedTiming t(__FUNCTION__, &timings); - compiler_options_->boot_image_ = false; + compiler_options_->image_type_ = CompilerOptions::ImageType::kNone; compiler_options_->SetCompilerFilter(CompilerFilter::kQuicken); // Create the main VerifierDeps, here instead of in the compiler since we want to aggregate // the results for all the dex files, not just the results for the current dex file. diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc index 685cde338b..3610f1831b 100644 --- a/compiler/driver/compiler_options.cc +++ b/compiler/driver/compiler_options.cc @@ -44,8 +44,7 @@ CompilerOptions::CompilerOptions() no_inline_from_(), dex_files_for_oat_file_(), image_classes_(), - boot_image_(false), - app_image_(false), + image_type_(ImageType::kNone), compiling_with_core_image_(false), baseline_(false), debuggable_(false), diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 2f4e5428ea..12fa251606 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -58,6 +58,12 @@ class CompilerOptions final { static const size_t kDefaultInlineMaxCodeUnits = 32; static constexpr size_t kUnsetInlineMaxCodeUnits = -1; + enum class ImageType : uint8_t { + kNone, // JIT or AOT app compilation producing only an oat file but no image. + kBootImage, // Creating boot image. + kAppImage, // Creating app image. + }; + CompilerOptions(); ~CompilerOptions(); @@ -191,7 +197,7 @@ class CompilerOptions final { // Are we compiling a boot image? bool IsBootImage() const { - return boot_image_; + return image_type_ == ImageType::kBootImage; } bool IsBaseline() const { @@ -200,11 +206,7 @@ class CompilerOptions final { // Are we compiling an app image? bool IsAppImage() const { - return app_image_; - } - - void DisableAppImage() { - app_image_ = false; + return image_type_ == ImageType::kAppImage; } // Returns whether we are compiling against a "core" image, which @@ -356,8 +358,7 @@ class CompilerOptions final { // Must not be empty for real boot image, only for tests pretending to compile boot image. HashSet<std::string> image_classes_; - bool boot_image_; - bool app_image_; + ImageType image_type_; bool compiling_with_core_image_; bool baseline_; bool debuggable_; diff --git a/compiler/verifier_deps_test.cc b/compiler/verifier_deps_test.cc index e1b23cc315..eb44dd7f1d 100644 --- a/compiler/verifier_deps_test.cc +++ b/compiler/verifier_deps_test.cc @@ -79,7 +79,7 @@ class VerifierDepsTest : public CommonCompilerTest { } void SetupCompilerDriver() { - compiler_options_->boot_image_ = false; + compiler_options_->image_type_ = CompilerOptions::ImageType::kNone; compiler_driver_->InitializeThreadPools(); } |