diff options
author | Takashi Kokubun <[email protected]> | 2025-03-06 10:25:05 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2025-04-18 21:52:59 +0900 |
commit | 48fa16f6445f7dbf47ccd81fe3c3fff7b2012866 () | |
tree | 121eafd7886479b2615b4fab03a06e9a9354ba7a /zjit/src/lib.rs | |
parent | 62adbdf247e92448f6a783e8c1f9d05d2e2f0406 (diff) |
Load Param off of cfp->ep (https://.com/Shopify/zjit/pull/31)
* Load Param off of cfp->ep * Test with --zjit-call-threshold=1 as well * Fix get_opnd's debug output * Return Mem operand from gen_param * Test both first and second calls * Spell out the namespace for Opnd returns * Update a comment about gen_param * Explain why we take a lock * Fix a typo
Notes: Merged: https://.com/ruby/ruby/pull/13131
-rw-r--r-- | zjit/src/lib.rs | 43 |
1 files changed, 25 insertions, 18 deletions
@@ -89,23 +89,30 @@ fn rb_bug_panic_hook() { /// Generate JIT code for a given ISEQ, which takes EC and CFP as its arguments. #[unsafe(no_mangle)] pub extern "C" fn rb_zjit_iseq_gen_entry_point(iseq: IseqPtr, _ec: EcPtr) -> *const u8 { - // TODO: acquire the VM barrier - - // Compile ISEQ into High-level IR - let ssa = match hir::iseq_to_hir(iseq) { - Ok(ssa) => ssa, - Err(err) => { - debug!("ZJIT: iseq_to_hir: {:?}", err); - return std::ptr::null(); - } - }; - - // Compile High-level IR into machine code - let cb = ZJITState::get_code_block(); - match gen_function(cb, &ssa, iseq) { - Some(start_ptr) => start_ptr.raw_ptr(cb), - - // Compilation failed, continue executing in the interpreter only - None => std::ptr::null(), } } |