summaryrefslogtreecommitdiff
path: root/runtime/compiler_callbacks.h
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2016-09-06 14:04:48 +0100
committerDavid Brazdil <dbrazdil@google.com>2016-09-16 10:08:18 +0100
commitca3c8c33501bf199d6fd0a5db30a27d8e010cb23 (patch)
tree12a6c3a4266bd17c6b9fe7066fd0b25cb8d9b2d6 /runtime/compiler_callbacks.h
parent0764877e21f1230e718923d5b84b048cd4346afa (diff)
Collect verifier dependencies
MethodVerifier tests whether a DEX method is valid w.r.t. the classes in class path. Since the APK does not change across OTA updates, it is not necessary to analyze the bytecode again with MethodVerifier, as long as its dependencies on the class path (which may have changed) are satisfied. This patch introduces VerifierDeps, a class path dependency collector, and adds hooks into MethodVerifier where classes/methods/fields are resolved and where assignability of types is tested. Test: m test-art-host-gtest-verifier_deps_test Bug: 30937355 Change-Id: Iee0b321d772a5c7d1cb471aaa6e13918310b7e2f
Diffstat (limited to 'runtime/compiler_callbacks.h')
-rw-r--r--runtime/compiler_callbacks.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h
index ee797e0712..00dedef1e7 100644
--- a/runtime/compiler_callbacks.h
+++ b/runtime/compiler_callbacks.h
@@ -25,6 +25,7 @@ namespace art {
namespace verifier {
class MethodVerifier;
+class VerifierDeps;
} // namespace verifier
@@ -45,6 +46,8 @@ class CompilerCallbacks {
// done so. Return false if relocating in this way would be problematic.
virtual bool IsRelocationPossible() = 0;
+ virtual verifier::VerifierDeps* GetVerifierDeps() const = 0;
+
bool IsBootImage() {
return mode_ == CallbackMode::kCompileBootImage;
}