diff options
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
-rw-r--r-- | runtime/interpreter/interpreter_switch_impl.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc index f6069785a2..25dbab2494 100644 --- a/runtime/interpreter/interpreter_switch_impl.cc +++ b/runtime/interpreter/interpreter_switch_impl.cc @@ -17,6 +17,7 @@ #include "base/stl_util.h" // MakeUnique #include "experimental_flags.h" #include "interpreter_common.h" +#include "jit/jit.h" #include "safe_math.h" #include <memory> // std::unique_ptr @@ -69,9 +70,14 @@ namespace interpreter { } \ } while (false) -#define BRANCH_INSTRUMENTATION(offset) \ - do { \ - instrumentation->Branch(self, shadow_frame.GetMethod(), dex_pc, offset); \ +#define BRANCH_INSTRUMENTATION(offset) \ + do { \ + ArtMethod* method = shadow_frame.GetMethod(); \ + instrumentation->Branch(self, method, dex_pc, offset); \ + JValue result; \ + if (jit::Jit::MaybeDoOnStackReplacement(self, method, dex_pc, offset, &result)) { \ + return result; \ + } \ } while (false) static bool IsExperimentalInstructionEnabled(const Instruction *inst) { |