diff options
author | 2024-05-17 10:37:36 +0200 | |
---|---|---|
committer | 2024-06-20 16:19:04 +0000 | |
commit | 05a5ff2a4152571e8e82ba4c407cf0fba0a57ddd (patch) | |
tree | 734fecaae333684a016f0a29be400fd32b9f87c2 /runtime/interpreter/interpreter.cc | |
parent | 9e9f99747ad3bdb06be114263c732c39fba9a692 (diff) |
Move some classes from `runtime/` to `dex2oat/`.
Move the transactional interpreter, `AotClassLinker`,
`Transaction` and `SdkChecker`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: If001e06711ee345ce5b937ed764e66b26a0abcd6
Diffstat (limited to 'runtime/interpreter/interpreter.cc')
-rw-r--r-- | runtime/interpreter/interpreter.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index fb6f36d5e7..eeeb300a92 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -237,13 +237,12 @@ static JValue ExecuteSwitch(Thread* self, ShadowFrame& shadow_frame, JValue result_register, bool interpret_one_instruction) REQUIRES_SHARED(Locks::mutator_lock_) { - if (Runtime::Current()->IsActiveTransaction()) { - return ExecuteSwitchImpl<true>( - self, accessor, shadow_frame, result_register, interpret_one_instruction); - } else { - return ExecuteSwitchImpl<false>( - self, accessor, shadow_frame, result_register, interpret_one_instruction); - } + 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); } NO_STACK_PROTECTOR |