diff options
-rw-r--r-- | runtime/interpreter/interpreter.cc | 8 | ||||
-rw-r--r-- | runtime/interpreter/interpreter_switch_impl-inl.h | 8 | ||||
-rw-r--r-- | runtime/interpreter/interpreter_switch_impl.h | 3 |
3 files changed, 4 insertions, 15 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index 59388e7c96..2665d00c8b 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -235,14 +235,13 @@ NO_STACK_PROTECTOR static JValue ExecuteSwitch(Thread* self, const CodeItemDataAccessor& accessor, ShadowFrame& shadow_frame, - JValue result_register, - bool interpret_one_instruction) REQUIRES_SHARED(Locks::mutator_lock_) { + JValue result_register) REQUIRES_SHARED(Locks::mutator_lock_) { Runtime* runtime = Runtime::Current(); auto switch_impl_cpp = runtime->IsActiveTransaction() ? runtime->GetClassLinker()->GetTransactionalInterpreter() : reinterpret_cast<const void*>(&ExecuteSwitchImplCpp</*transaction_active=*/ false>); return ExecuteSwitchImpl( - self, accessor, shadow_frame, result_register, interpret_one_instruction, switch_impl_cpp); + self, accessor, shadow_frame, result_register, switch_impl_cpp); } NO_STACK_PROTECTOR @@ -339,8 +338,7 @@ static inline JValue Execute( VLOG(interpreter) << "Interpreting " << method->PrettyMethod(); - return ExecuteSwitch( - self, accessor, shadow_frame, result_register, /*interpret_one_instruction=*/ false); + return ExecuteSwitch(self, accessor, shadow_frame, result_register); } void EnterInterpreterFromInvoke(Thread* self, diff --git a/runtime/interpreter/interpreter_switch_impl-inl.h b/runtime/interpreter/interpreter_switch_impl-inl.h index 1ebac52c1e..3e741993db 100644 --- a/runtime/interpreter/interpreter_switch_impl-inl.h +++ b/runtime/interpreter/interpreter_switch_impl-inl.h @@ -2035,7 +2035,6 @@ void ExecuteSwitchImplCpp(SwitchImplContext* ctx) { DCHECK(!shadow_frame.GetForceRetryInstruction()) << "Entered interpreter from invoke without retry instruction being handled!"; - bool const interpret_one_instruction = ctx->interpret_one_instruction; while (true) { const Instruction* const inst = next; dex_pc = inst->GetDexPc(insns); @@ -2054,7 +2053,7 @@ void ExecuteSwitchImplCpp(SwitchImplContext* ctx) { next = inst->RelativeAt(Instruction::SizeInCodeUnits(Instruction::FORMAT)); \ success = OP_##OPCODE_NAME<transaction_active>( \ ctx, instrumentation, self, shadow_frame, dex_pc, inst, inst_data, next, exit); \ - if (success && LIKELY(!interpret_one_instruction)) { \ + if (success) { \ continue; \ } \ break; \ @@ -2076,11 +2075,6 @@ void ExecuteSwitchImplCpp(SwitchImplContext* ctx) { } // Continue execution in the catch block. } - if (interpret_one_instruction) { - shadow_frame.SetDexPC(next->GetDexPc(insns)); // Record where we stopped. - ctx->result = ctx->result_register; - return; - } } } // NOLINT(readability/fn_size) diff --git a/runtime/interpreter/interpreter_switch_impl.h b/runtime/interpreter/interpreter_switch_impl.h index 0b5a86f22d..9e5f8f5f7d 100644 --- a/runtime/interpreter/interpreter_switch_impl.h +++ b/runtime/interpreter/interpreter_switch_impl.h @@ -40,7 +40,6 @@ struct SwitchImplContext { const CodeItemDataAccessor& accessor; ShadowFrame& shadow_frame; JValue& result_register; - bool interpret_one_instruction; JValue result; }; @@ -60,7 +59,6 @@ ALWAYS_INLINE inline JValue ExecuteSwitchImpl(Thread* self, const CodeItemDataAccessor& accessor, ShadowFrame& shadow_frame, JValue result_register, - bool interpret_one_instruction, const void* switch_impl_cpp) REQUIRES_SHARED(Locks::mutator_lock_) { SwitchImplContext ctx { @@ -68,7 +66,6 @@ ALWAYS_INLINE inline JValue ExecuteSwitchImpl(Thread* self, .accessor = accessor, .shadow_frame = shadow_frame, .result_register = result_register, - .interpret_one_instruction = interpret_one_instruction, .result = JValue(), }; const uint16_t* dex_pc = ctx.accessor.Insns(); |