diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 15:53:03 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 17:16:07 +0100 |
commit | 286763464072ffb599846f76720c7ec54392ae6e (patch) | |
tree | c735e7e8dc14f8c978c75a08d8a32e8bb46632fe /runtime | |
parent | b5171ff4859104a1e314c3091b6bd4872ad7c2b2 (diff) | |
download | art-286763464072ffb599846f76720c7ec54392ae6e.zip art-286763464072ffb599846f76720c7ec54392ae6e.tar.gz art-286763464072ffb599846f76720c7ec54392ae6e.tar.bz2 |
Use a flag from the verifier to know if we should compile.
Only used for the lack of bottom type in the aget-object case
for now. Could be used for more.
bug:21865466
(cherry picked from commit 4824c27988c8eeb302791624bb3ce1d557b0db6c)
Change-Id: I2bb7fe1d4737bd92c1076b5193607d74d8761ee7
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/verifier/method_verifier.cc | 1 | ||||
-rw-r--r-- | runtime/verifier/method_verifier.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index 5436100..bcad9b6 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -3728,6 +3728,7 @@ void MethodVerifier::VerifyAGet(const Instruction* inst, } else { const RegType& array_type = work_line_->GetRegisterType(this, inst->VRegB_23x()); if (array_type.IsZero()) { + have_pending_runtime_throw_failure_ = true; // Null array class; this code path will fail at runtime. Infer a merge-able type from the // instruction type. TODO: have a proper notion of bottom here. if (!is_primitive || insn_type.IsCategory1Types()) { diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h index cd691a3..204b18e 100644 --- a/runtime/verifier/method_verifier.h +++ b/runtime/verifier/method_verifier.h @@ -244,6 +244,10 @@ class MethodVerifier { bool HasCheckCasts() const; bool HasVirtualOrInterfaceInvokes() const; bool HasFailures() const; + bool HasInstructionThatWillThrow() const { + return have_pending_runtime_throw_failure_; + } + const RegType& ResolveCheckedClass(uint32_t class_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Returns the method of a quick invoke or null if it cannot be found. |