diff options
author | 2018-01-19 21:23:04 -0800 | |
---|---|---|
committer | 2018-01-19 21:55:33 -0800 | |
commit | e993458e8192b24621cb88a6ebcdbfd66f01da45 (patch) | |
tree | 4322c1b8b055cae814c28f326c07b301ca0f8b61 /compiler/dex/quick_compiler_callbacks.h | |
parent | ba94510917814f9e79233bc6de192e87078c6941 (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 'compiler/dex/quick_compiler_callbacks.h')
-rw-r--r-- | compiler/dex/quick_compiler_callbacks.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.h b/compiler/dex/quick_compiler_callbacks.h index 6d22f955a3..8a07e9c12c 100644 --- a/compiler/dex/quick_compiler_callbacks.h +++ b/compiler/dex/quick_compiler_callbacks.h @@ -23,12 +23,13 @@ namespace art { class CompilerDriver; +class DexFile; class VerificationResults; class QuickCompilerCallbacks FINAL : public CompilerCallbacks { public: explicit QuickCompilerCallbacks(CompilerCallbacks::CallbackMode mode) - : CompilerCallbacks(mode) {} + : CompilerCallbacks(mode), dex_files_(nullptr) {} ~QuickCompilerCallbacks() { } @@ -65,11 +66,19 @@ class QuickCompilerCallbacks FINAL : public CompilerCallbacks { void UpdateClassState(ClassReference ref, ClassStatus state) OVERRIDE; + bool CanUseOatStatusForVerification(mirror::Class* klass) OVERRIDE + REQUIRES_SHARED(Locks::mutator_lock_); + + void SetDexFiles(const std::vector<const DexFile*>* dex_files) { + dex_files_ = dex_files; + } + private: VerificationResults* verification_results_ = nullptr; bool does_class_unloading_ = false; CompilerDriver* compiler_driver_ = nullptr; std::unique_ptr<verifier::VerifierDeps> verifier_deps_; + const std::vector<const DexFile*>* dex_files_; }; } // namespace art |