summaryrefslogtreecommitdiff
path: root/runtime/compiler_callbacks.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-01-19 21:23:04 -0800
committer Andreas Gampe <agampe@google.com> 2018-01-19 21:55:33 -0800
commite993458e8192b24621cb88a6ebcdbfd66f01da45 (patch)
tree4322c1b8b055cae814c28f326c07b301ca0f8b61 /runtime/compiler_callbacks.h
parentba94510917814f9e79233bc6de192e87078c6941 (diff)
ART: Allow oatstatus verification for app dependencies
Allow taking verification state from the oat file durin compilation if the class is a dependency (thus not being compiled itself). This is necessary in case the dependency itself has been quickened and stripped, as quickened bytecodes are not supported during compile- time verification. Expose this through the CompilerCallbacks. Bug: 72237763 Test: m test-art-host Change-Id: I9b7d3a353d81a6422c3b145fd5c5b71f36c6f257
Diffstat (limited to 'runtime/compiler_callbacks.h')
-rw-r--r--runtime/compiler_callbacks.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h
index 4560bca922..8395966404 100644
--- a/runtime/compiler_callbacks.h
+++ b/runtime/compiler_callbacks.h
@@ -25,6 +25,12 @@ namespace art {
class CompilerDriver;
+namespace mirror {
+
+class Class;
+
+} // namespace mirror
+
namespace verifier {
class MethodVerifier;
@@ -68,6 +74,11 @@ class CompilerCallbacks {
virtual void UpdateClassState(ClassReference ref ATTRIBUTE_UNUSED,
ClassStatus state ATTRIBUTE_UNUSED) {}
+ virtual bool CanUseOatStatusForVerification(mirror::Class* klass ATTRIBUTE_UNUSED)
+ REQUIRES_SHARED(Locks::mutator_lock_) {
+ return false;
+ }
+
protected:
explicit CompilerCallbacks(CallbackMode mode) : mode_(mode) { }