summaryrefslogtreecommitdiff
path: root/compiler/dex/quick_compiler_callbacks.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-08-09 10:05:47 -0700
committer Mathieu Chartier <mathieuc@google.com> 2017-08-09 11:16:52 -0700
commit9e050df94df5c6736e1e24705194f62fbc119114 (patch)
tree0fe2c2a7a9e01cba8abaf449938503e5b906ee78 /compiler/dex/quick_compiler_callbacks.cc
parent1bd8e5a1b2055e0ff7977ba7e149534d2ee0a696 (diff)
Revert "Revert "Support class unloading in dex2oat for quicken multidex""
Bug: 63467744 Test: test-art-host This reverts commit 6921d90a241f0307ac25120f8f976744d4a57706. Change-Id: If70e31d3a15579dc75fd40bfef186e0124568c87
Diffstat (limited to 'compiler/dex/quick_compiler_callbacks.cc')
-rw-r--r--compiler/dex/quick_compiler_callbacks.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc
index 872f7ea15d..c7e9f4fc07 100644
--- a/compiler/dex/quick_compiler_callbacks.cc
+++ b/compiler/dex/quick_compiler_callbacks.cc
@@ -16,6 +16,7 @@
#include "quick_compiler_callbacks.h"
+#include "driver/compiler_driver.h"
#include "verification_results.h"
#include "verifier/method_verifier-inl.h"
@@ -33,4 +34,17 @@ void QuickCompilerCallbacks::ClassRejected(ClassReference ref) {
}
}
+bool QuickCompilerCallbacks::CanAssumeVerified(ClassReference ref) {
+ // If we don't have class unloading enabled in the compiler, we will never see class that were
+ // previously verified. Return false to avoid overhead from the lookup in the compiler driver.
+ if (!does_class_unloading_) {
+ return false;
+ }
+ DCHECK(compiler_driver_ != nullptr);
+ // In the case of the quicken filter: avoiding verification of quickened instructions, which the
+ // verifier doesn't currently support.
+ // In the case of the verify filter, avoiding verifiying twice.
+ return compiler_driver_->CanAssumeVerified(ref);
+}
+
} // namespace art