From dc4bccef0ded1c261bf9838def2ef329765a8682 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 21 Jun 2018 16:15:42 +0100 Subject: Move image_classes_ to CompilerOptions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ifb30e071d7b39ae939fc3f83d7eba82fd077c7e8 --- compiler/driver/compiler_options.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_options.cc') diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc index 933be4f004..3d37b680ee 100644 --- a/compiler/driver/compiler_options.cc +++ b/compiler/driver/compiler_options.cc @@ -37,7 +37,8 @@ CompilerOptions::CompilerOptions() tiny_method_threshold_(kDefaultTinyMethodThreshold), num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold), inline_max_code_units_(kUnsetInlineMaxCodeUnits), - no_inline_from_(nullptr), + no_inline_from_(), + image_classes_(), boot_image_(false), core_image_(false), app_image_(false), @@ -67,8 +68,8 @@ CompilerOptions::CompilerOptions() } CompilerOptions::~CompilerOptions() { - // The destructor looks empty but it destroys a PassManagerOptions object. We keep it here - // because we don't want to include the PassManagerOptions definition from the header file. + // Everything done by member destructors. + // The definitions of classes forward-declared in the header have now been #included. } namespace { @@ -129,4 +130,11 @@ bool CompilerOptions::ParseCompilerOptions(const std::vector& optio #pragma GCC diagnostic pop +bool CompilerOptions::IsImageClass(const char* descriptor) const { + // Historical note: We used to hold the set indirectly and there was a distinction between an + // empty set and a null, null meaning to include all classes. However, the distiction has been + // removed; if we don't have a profile, we treat it as an empty set of classes. b/77340429 + return image_classes_.find(StringPiece(descriptor)) != image_classes_.end(); +} + } // namespace art -- cgit v1.2.3-59-g8ed1b