summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_switch_impl.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-05-17 10:37:36 +0200
committer VladimĂ­r Marko <vmarko@google.com> 2024-06-20 16:19:04 +0000
commit05a5ff2a4152571e8e82ba4c407cf0fba0a57ddd (patch)
tree734fecaae333684a016f0a29be400fd32b9f87c2 /runtime/interpreter/interpreter_switch_impl.h
parent9e9f99747ad3bdb06be114263c732c39fba9a692 (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_switch_impl.h')
-rw-r--r--runtime/interpreter/interpreter_switch_impl.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.h b/runtime/interpreter/interpreter_switch_impl.h
index c390692f10..0b5a86f22d 100644
--- a/runtime/interpreter/interpreter_switch_impl.h
+++ b/runtime/interpreter/interpreter_switch_impl.h
@@ -51,16 +51,17 @@ void ExecuteSwitchImplCpp(SwitchImplContext* ctx)
// Hand-written assembly method which wraps the C++ implementation,
// while defining the DEX PC in the CFI so that libunwind can resolve it.
-extern "C" void ExecuteSwitchImplAsm(SwitchImplContext* ctx, void* impl, const uint16_t* dexpc)
- REQUIRES_SHARED(Locks::mutator_lock_);
+extern "C" void ExecuteSwitchImplAsm(
+ SwitchImplContext* ctx, const void* impl, const uint16_t* dexpc)
+ REQUIRES_SHARED(Locks::mutator_lock_);
// Wrapper around the switch interpreter which ensures we can unwind through it.
-template<bool transaction_active>
-ALWAYS_INLINE JValue ExecuteSwitchImpl(Thread* self,
- const CodeItemDataAccessor& accessor,
- ShadowFrame& shadow_frame,
- JValue result_register,
- bool interpret_one_instruction)
+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 {
.self = self,
@@ -70,9 +71,8 @@ ALWAYS_INLINE JValue ExecuteSwitchImpl(Thread* self,
.interpret_one_instruction = interpret_one_instruction,
.result = JValue(),
};
- void* impl = reinterpret_cast<void*>(&ExecuteSwitchImplCpp<transaction_active>);
const uint16_t* dex_pc = ctx.accessor.Insns();
- ExecuteSwitchImplAsm(&ctx, impl, dex_pc);
+ ExecuteSwitchImplAsm(&ctx, switch_impl_cpp, dex_pc);
return ctx.result;
}