summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2015-06-25 15:53:45 -0700
committerAndreas Gampe <agampe@google.com>2015-06-25 18:56:28 -0700
commit88802ca3587f808fb56d759fe3a85adb0f943234 (patch)
tree9d664dbc400e0f3c15eda40f60b9c94aa874b817 /compiler
parent2eb85431142f5f45f5f5b3dd67dad42bb1dc4a8a (diff)
downloadart-88802ca3587f808fb56d759fe3a85adb0f943234.zip
art-88802ca3587f808fb56d759fe3a85adb0f943234.tar.gz
art-88802ca3587f808fb56d759fe3a85adb0f943234.tar.bz2
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
Diffstat (limited to 'compiler')
-rw-r--r--compiler/dex/verification_results.cc5
-rw-r--r--compiler/driver/compiler_options.h2
2 files changed, 4 insertions, 3 deletions
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.
};