diff options
author | 2019-07-25 14:13:23 -0700 | |
---|---|---|
committer | 2019-07-29 20:10:20 +0000 | |
commit | fef91cc973f193d5b3a5a554b4910f0c548c08ad (patch) | |
tree | 6aa735be1e7ff51073eeb15b70a67a2f1c4037d8 /runtime/verifier/method_verifier.h | |
parent | e0bbab9fe1b073fecae78ca5d269bd0b2a177b4f (diff) |
ART: Verifier cleanup
Start making the method verifier more independent of externalities.
This will be implemented as incremental changes.
In this CL, replace querrying Runtime::Current() for AoT status
with a flag.
Test: m test-art-host
Change-Id: I91a3ad0208b544f47bb83db96edca6b4f86e5ce5
Diffstat (limited to 'runtime/verifier/method_verifier.h')
-rw-r--r-- | runtime/verifier/method_verifier.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h index f77fa1fca8..14f5b746dc 100644 --- a/runtime/verifier/method_verifier.h +++ b/runtime/verifier/method_verifier.h @@ -198,6 +198,10 @@ class MethodVerifier { return class_linker_; } + bool IsAotMode() const { + return flags_.aot_mode_; + } + protected: MethodVerifier(Thread* self, ClassLinker* class_linker, @@ -206,7 +210,8 @@ class MethodVerifier { uint32_t dex_method_idx, bool can_load_classes, bool allow_thread_suspension, - bool allow_soft_failures) + bool allow_soft_failures, + bool aot_mode) REQUIRES_SHARED(Locks::mutator_lock_); // Verification result for method(s). Includes a (maximum) failure kind, and (the union of) @@ -245,6 +250,7 @@ class MethodVerifier { HardFailLogMode log_level, bool need_precise_constants, uint32_t api_level, + bool aot_mode, std::string* hard_failure_msg) REQUIRES_SHARED(Locks::mutator_lock_); @@ -264,6 +270,7 @@ class MethodVerifier { HardFailLogMode log_level, bool need_precise_constants, uint32_t api_level, + bool aot_mode, std::string* hard_failure_msg) REQUIRES_SHARED(Locks::mutator_lock_); @@ -339,6 +346,9 @@ class MethodVerifier { // A version of the above that is not reset and thus captures if there were *any* throw // failures. bool have_any_pending_runtime_throw_failure_ : 1; + + // Verify in AoT mode? + bool aot_mode_ : 1; } flags_; // Info message log use primarily for verifier diagnostics. |