From 88802ca3587f808fb56d759fe3a85adb0f943234 Mon Sep 17 00:00:00 2001 From: buzbee Date: Thu, 25 Jun 2015 15:53:45 -0700 Subject: ART: Fix kEverything compiler filter Previously the kEverything filter failed to compile class initializers. Now it will. Bug: 19576257 (cherry picked from commit c83329952b4a313e747c8835a73699e2cae5a6e2) Change-Id: I189d2b5b379aee112c4e95f8d3e6c32abab6ed41 --- compiler/dex/verification_results.cc | 5 +++-- compiler/driver/compiler_options.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler') diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc index c1d5cb7..6f2b234 100644 --- a/compiler/dex/verification_results.cc +++ b/compiler/dex/verification_results.cc @@ -110,8 +110,9 @@ bool VerificationResults::IsCandidateForCompilation(MethodReference&, if (!compiler_options_->IsCompilationEnabled()) { return false; } - // Don't compile class initializers, ever. - if (((access_flags & kAccConstructor) != 0) && ((access_flags & kAccStatic) != 0)) { + // Don't compile class initializers unless kEverything. + if ((compiler_options_->GetCompilerFilter() != CompilerOptions::kEverything) && + ((access_flags & kAccConstructor) != 0) && ((access_flags & kAccStatic) != 0)) { return false; } return true; diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 356663b..fe681e2 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -37,7 +37,7 @@ class CompilerOptions FINAL { kSpace, // Maximize space savings. kBalanced, // Try to get the best performance return on compilation investment. kSpeed, // Maximize runtime performance. - kEverything, // Force compilation (Note: excludes compilation of class initializers). + kEverything, // Force compilation of everything capable of being compiled. kTime, // Compile methods, but minimize compilation time. }; -- cgit v1.1