diff options
| author | 2014-12-11 19:19:40 +0000 | |
|---|---|---|
| committer | 2014-12-11 19:19:41 +0000 | |
| commit | 68a8f5e9e9cda48002394cc4d0ca6fe98edd23f3 (patch) | |
| tree | 0cd277bb9f09a8a7f138baed0cc68b8d448e0c16 /runtime | |
| parent | f41ac3d237d24b9a4b6fb33e7edb67320cdb1900 (diff) | |
| parent | 36b58f5ebb85d58f8b5966b8577a6dfe720d1e16 (diff) | |
Merge "Add verifier support for dequickening"
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_); |