ART: Fix kEverything compiler filter
Previously the kEverything filter failed to compile class
initializers. Now it will.
Bug: 19576257
Change-Id: I189d2b5b379aee112c4e95f8d3e6c32abab6ed41
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 @@
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;