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.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index 0488dbf028..43889c6666 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -37,6 +37,7 @@ namespace interpreter {
shadow_frame.GetLockCountData(). \
CheckAllMonitorsReleasedOrThrow<do_assignability_check>(self); \
if (interpret_one_instruction) { \
+ /* Signal mterp to return to caller */ \
shadow_frame.SetDexPC(DexFile::kDexNoIndex); \
} \
return JValue(); /* Handled in caller. */ \
@@ -76,6 +77,10 @@ namespace interpreter {
instrumentation->Branch(self, method, dex_pc, offset); \
JValue result; \
if (jit::Jit::MaybeDoOnStackReplacement(self, method, dex_pc, offset, &result)) { \
+ if (interpret_one_instruction) { \
+ /* OSR has completed execution of the method. Signal mterp to return to caller */ \
+ shadow_frame.SetDexPC(DexFile::kDexNoIndex); \
+ } \
return result; \
} \
} while (false)
@@ -205,6 +210,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
result);
}
if (interpret_one_instruction) {
+ /* Signal mterp to return to caller */
shadow_frame.SetDexPC(DexFile::kDexNoIndex);
}
return result;
@@ -221,6 +227,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
result);
}
if (interpret_one_instruction) {
+ /* Signal mterp to return to caller */
shadow_frame.SetDexPC(DexFile::kDexNoIndex);
}
return result;
@@ -238,6 +245,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
result);
}
if (interpret_one_instruction) {
+ /* Signal mterp to return to caller */
shadow_frame.SetDexPC(DexFile::kDexNoIndex);
}
return result;
@@ -254,6 +262,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
result);
}
if (interpret_one_instruction) {
+ /* Signal mterp to return to caller */
shadow_frame.SetDexPC(DexFile::kDexNoIndex);
}
return result;
@@ -292,6 +301,7 @@ JValue ExecuteSwitchImpl(Thread* self, const DexFile::CodeItem* code_item,
result);
}
if (interpret_one_instruction) {
+ /* Signal mterp to return to caller */
shadow_frame.SetDexPC(DexFile::kDexNoIndex);
}
return result;