summaryrefslogtreecommitdiffstats
path: root/compiler/driver
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2018-11-13 13:09:51 +0000
committerVladimir Marko <vmarko@google.com>2018-11-14 10:21:55 +0000
commit6be1dbd3bc34b2cfa0fe257acbea273f1b6f4a53 (patch)
tree1840224989e4cbd538081951d948ed6a19bc61b4 /compiler/driver
parentdbcb48fc0d0841f327d108246487a4ef3df556ed (diff)
downloadart-6be1dbd3bc34b2cfa0fe257acbea273f1b6f4a53.tar.gz
art-6be1dbd3bc34b2cfa0fe257acbea273f1b6f4a53.tar.bz2
art-6be1dbd3bc34b2cfa0fe257acbea273f1b6f4a53.zip
ART: Rewrite core image detection.
Remove unused compiler option `core_image_` and cache the IsCompilingWithCoreImage in the CompilerOptions instead. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Idcf3b6c96dab9a39f823a16778e7698589442cd8
Diffstat (limited to 'compiler/driver')
-rw-r--r--compiler/driver/compiler_options.cc2
-rw-r--r--compiler/driver/compiler_options.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc
index be8e10e41e..685cde338b 100644
--- a/compiler/driver/compiler_options.cc
+++ b/compiler/driver/compiler_options.cc
@@ -45,8 +45,8 @@ CompilerOptions::CompilerOptions()
dex_files_for_oat_file_(),
image_classes_(),
boot_image_(false),
- core_image_(false),
app_image_(false),
+ compiling_with_core_image_(false),
baseline_(false),
debuggable_(false),
generate_debug_info_(kDefaultGenerateDebugInfo),
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 77f84820e5..2f4e5428ea 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -198,13 +198,6 @@ class CompilerOptions final {
return baseline_;
}
- // Are we compiling a core image (small boot image only used for ART testing)?
- bool IsCoreImage() const {
- // Ensure that `core_image_` => `boot_image_`.
- DCHECK(!core_image_ || boot_image_);
- return core_image_;
- }
-
// Are we compiling an app image?
bool IsAppImage() const {
return app_image_;
@@ -214,6 +207,13 @@ class CompilerOptions final {
app_image_ = false;
}
+ // Returns whether we are compiling against a "core" image, which
+ // is an indicative we are running tests. The compiler will use that
+ // information for checking invariants.
+ bool CompilingWithCoreImage() const {
+ return compiling_with_core_image_;
+ }
+
// Should the code be compiled as position independent?
bool GetCompilePic() const {
return compile_pic_;
@@ -357,8 +357,8 @@ class CompilerOptions final {
HashSet<std::string> image_classes_;
bool boot_image_;
- bool core_image_;
bool app_image_;
+ bool compiling_with_core_image_;
bool baseline_;
bool debuggable_;
bool generate_debug_info_;