summaryrefslogtreecommitdiff
path: root/compiler/dex/quick_compiler_callbacks.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-08-31 10:36:31 -0700
committer Andreas Gampe <agampe@google.com> 2017-09-05 10:57:39 -0700
commit5d3b002b9a244b5dc25fe97fedcb92851d9073f7 (patch)
tree46203949455b1087fe36158da75af3af3db127aa /compiler/dex/quick_compiler_callbacks.cc
parentee5303f76ef167714a6a04d3abc502584ac5e103 (diff)
ART: Change CanAssumeVerified to GetPreviousClassState
Return any stored class state instead of a bool to allow more recognized states in the future. Bug: 63467744 Bug: 65318848 Test: m test-art-host Change-Id: Id097273a41e09ee77c8d53377ad9beb09104a944
Diffstat (limited to 'compiler/dex/quick_compiler_callbacks.cc')
-rw-r--r--compiler/dex/quick_compiler_callbacks.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc
index c7e9f4fc07..23511e55fc 100644
--- a/compiler/dex/quick_compiler_callbacks.cc
+++ b/compiler/dex/quick_compiler_callbacks.cc
@@ -34,17 +34,21 @@ void QuickCompilerCallbacks::ClassRejected(ClassReference ref) {
}
}
-bool QuickCompilerCallbacks::CanAssumeVerified(ClassReference ref) {
+ClassStatus QuickCompilerCallbacks::GetPreviousClassState(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;
+ return ClassStatus::kStatusNotReady;
}
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);
+ ClassStatus status;
+ if (!compiler_driver_->GetCompiledClass(ref, &status)) {
+ return ClassStatus::kStatusNotReady;
+ }
+ return status;
}
} // namespace art