diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/mirror/art_method.h | 5 | ||||
| -rw-r--r-- | runtime/verifier/method_verifier.cc | 2 | ||||
| -rw-r--r-- | runtime/verifier/method_verifier.h | 9 |
3 files changed, 10 insertions, 6 deletions
diff --git a/runtime/mirror/art_method.h b/runtime/mirror/art_method.h index 64663ed0cc..9b982b769b 100644 --- a/runtime/mirror/art_method.h +++ b/runtime/mirror/art_method.h @@ -20,6 +20,7 @@ #include "dex_file.h" #include "gc_root.h" #include "invoke_type.h" +#include "method_reference.h" #include "modifiers.h" #include "object.h" #include "object_callbacks.h" @@ -522,6 +523,10 @@ class MANAGED ArtMethod FINAL : public Object { uintptr_t ToNativeQuickPc(const uint32_t dex_pc, bool abort_on_failure = true) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + MethodReference ToMethodReference() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + return MethodReference(GetDexFile(), GetDexMethodIndex()); + } + // Find the catch block for the given exception type and dex_pc. When a catch block is found, // indicates whether the found catch block is responsible for clearing the exception or whether // a move-exception instruction is present. diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index 59efebf20d..65c5c21743 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -3408,7 +3408,7 @@ mirror::ArtMethod* MethodVerifier::GetQuickInvokedMethod(const Instruction* inst return nullptr; } mirror::ArtMethod* res_method = dispatch_class->GetVTableEntry(vtable_index); - if (FailOrAbort(this, !Thread::Current()->IsExceptionPending(), + if (FailOrAbort(this, !self_->IsExceptionPending(), "Unexpected exception pending for quickened invoke at ", work_insn_idx_)) { return nullptr; diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h index 0c4bf3c703..c3bd4af21a 100644 --- a/runtime/verifier/method_verifier.h +++ b/runtime/verifier/method_verifier.h @@ -238,6 +238,10 @@ class MethodVerifier { bool HasFailures() const; const RegType& ResolveCheckedClass(uint32_t class_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + mirror::ArtMethod* GetQuickInvokedMethod(const Instruction* inst, + RegisterLine* reg_line, + bool is_range) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); private: // Private constructor for dumping. @@ -586,11 +590,6 @@ class MethodVerifier { mirror::ArtMethod* res_method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - mirror::ArtMethod* GetQuickInvokedMethod(const Instruction* inst, - RegisterLine* reg_line, - bool is_range) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - mirror::ArtMethod* VerifyInvokeVirtualQuickArgs(const Instruction* inst, bool is_range) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); |