summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2014-06-10 18:21:32 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-06-10 18:21:32 +0000
commit5bf6a77944acdeb0a9464803c70d0c65cf15b68b (patch)
treeee66c89cf844201630b47eb0c0c438b88e3ab866 /runtime/interpreter/interpreter_common.h
parent335b91fb98d8004580e9a58335a873a1874fa5a5 (diff)
parentbfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe (diff)
Merge "Change MethodHelper to use a Handle."
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r--runtime/interpreter/interpreter_common.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index 6e136d62c3..88a84689b5 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -604,10 +604,15 @@ static inline uint32_t FindNextInstructionFollowingException(Thread* self,
ThrowLocation throw_location;
mirror::Throwable* exception = self->GetException(&throw_location);
bool clear_exception = false;
- StackHandleScope<3> hs(self);
- Handle<mirror::Class> exception_class(hs.NewHandle(exception->GetClass()));
- uint32_t found_dex_pc = shadow_frame.GetMethod()->FindCatchBlock(exception_class, dex_pc,
- &clear_exception);
+ uint32_t found_dex_pc;
+ {
+ StackHandleScope<3> hs(self);
+ Handle<mirror::Class> exception_class(hs.NewHandle(exception->GetClass()));
+ Handle<mirror::ArtMethod> h_method(hs.NewHandle(shadow_frame.GetMethod()));
+ HandleWrapper<mirror::Object> h(hs.NewHandleWrapper(&this_object));
+ found_dex_pc = mirror::ArtMethod::FindCatchBlock(h_method, exception_class, dex_pc,
+ &clear_exception);
+ }
if (found_dex_pc == DexFile::kDexNoIndex) {
instrumentation->MethodUnwindEvent(self, this_object,
shadow_frame.GetMethod(), dex_pc);
@@ -627,7 +632,7 @@ static inline void UnexpectedOpcode(const Instruction* inst, MethodHelper& mh)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static inline void UnexpectedOpcode(const Instruction* inst, MethodHelper& mh) {
- LOG(FATAL) << "Unexpected instruction: " << inst->DumpString(&mh.GetDexFile());
+ LOG(FATAL) << "Unexpected instruction: " << inst->DumpString(mh.GetMethod()->GetDexFile());
exit(0); // Unreachable, keep GCC happy.
}
@@ -640,7 +645,7 @@ static inline void TraceExecution(const ShadowFrame& shadow_frame, const Instruc
std::ostringstream oss;
oss << PrettyMethod(shadow_frame.GetMethod())
<< StringPrintf("\n0x%x: ", dex_pc)
- << inst->DumpString(&mh.GetDexFile()) << "\n";
+ << inst->DumpString(mh.GetMethod()->GetDexFile()) << "\n";
for (uint32_t i = 0; i < shadow_frame.NumberOfVRegs(); ++i) {
uint32_t raw_value = shadow_frame.GetVReg(i);
Object* ref_value = shadow_frame.GetVRegReference(i);