summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_switch_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
-rw-r--r--runtime/interpreter/interpreter_switch_impl.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index f352960204..69e091b42d 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -30,10 +30,7 @@ namespace interpreter {
do { \
DCHECK(self->IsExceptionPending()); \
self->AllowThreadSuspension(); \
- uint32_t found_dex_pc = FindNextInstructionFollowingException(self, shadow_frame, \
- inst->GetDexPc(insns), \
- instr); \
- if (found_dex_pc == DexFile::kDexNoIndex) { \
+ if (!MoveToExceptionHandler(self, shadow_frame, instr)) { \
/* Structured locking is to be enforced for abnormal termination, too. */ \
DoMonitorCheckOnExit<do_assignability_check>(self, &shadow_frame); \
if (interpret_one_instruction) { \
@@ -42,7 +39,8 @@ namespace interpreter {
} \
return JValue(); /* Handled in caller. */ \
} else { \
- int32_t displacement = static_cast<int32_t>(found_dex_pc) - static_cast<int32_t>(dex_pc); \
+ int32_t displacement = \
+ static_cast<int32_t>(shadow_frame.GetDexPC()) - static_cast<int32_t>(dex_pc); \
inst = inst->RelativeAt(displacement); \
} \
} while (false)