diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2025-07-17 14:12:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 14:12:54 -0700 |
| commit | 014df99c9401056862fae741d0d2fc9892de5eba (patch) | |
| tree | a6882e018867f021e7ad2b6e49686bd4c3e68f17 | |
| parent | 148db9c80f11af1780f0f3685201f28de8f6b47a (diff) | |
ZJIT: Remove obsoleted exit_trampoline (#13943)
| -rw-r--r-- | zjit/src/state.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/zjit/src/state.rs b/zjit/src/state.rs index cb68f8a8ef..001b550747 100644 --- a/zjit/src/state.rs +++ b/zjit/src/state.rs @@ -3,8 +3,6 @@ use crate::cruby_methods; use crate::invariants::Invariants; use crate::options::Options; use crate::asm::CodeBlock; -use crate::backend::lir::{asm_comment, Assembler, C_RET_OPND}; -use crate::virtualmem::CodePtr; #[allow(non_upper_case_globals)] #[unsafe(no_mangle)] @@ -31,9 +29,6 @@ pub struct ZJITState { /// Properties of core library methods method_annotations: cruby_methods::Annotations, - - /// Trampoline to propagate a callee's side exit to the caller - exit_trampoline: Option<CodePtr>, } /// Private singleton instance of the codegen globals @@ -88,14 +83,8 @@ impl ZJITState { invariants: Invariants::default(), assert_compiles: false, method_annotations: cruby_methods::init(), - exit_trampoline: None, }; unsafe { ZJIT_STATE = Some(zjit_state); } - - // Generate trampolines after initializing ZJITState, which Assembler will use - let cb = ZJITState::get_code_block(); - let exit_trampoline = Self::gen_exit_trampoline(cb).unwrap(); - ZJITState::get_instance().exit_trampoline = Some(exit_trampoline); } /// Return true if zjit_state has been initialized @@ -137,20 +126,6 @@ impl ZJITState { let instance = ZJITState::get_instance(); instance.assert_compiles = true; } - - /// Generate a trampoline to propagate a callee's side exit to the caller - fn gen_exit_trampoline(cb: &mut CodeBlock) -> Option<CodePtr> { - let mut asm = Assembler::new(); - asm_comment!(asm, "ZJIT exit trampoline"); - asm.frame_teardown(); - asm.cret(C_RET_OPND); - asm.compile(cb).map(|(start_ptr, _)| start_ptr) - } - - /// Get the trampoline to propagate a callee's side exit to the caller - pub fn get_exit_trampoline() -> CodePtr { - ZJITState::get_instance().exit_trampoline.unwrap() - } } /// Initialize ZJIT, given options allocated by rb_zjit_init_options() |
