summaryrefslogtreecommitdiff
path: root/zjit/src
AgeCommit message (Collapse)Author
2025-09-10ZJIT: Removed unused self_val from SendStan Lo
2025-09-10ZJIT: Removed unused self_val from InvokeSuperStan Lo
2025-09-10ZJIT: Support `invokeblock` insn (#14496)Stan Lo
ZJIT: Support invokeblock insn Basically like other send-ish insns, except that it doesn't pop the receiver.
2025-09-10ZJIT: Compile ISEQs with forwardable parameters (#14491)Takashi Kokubun
2025-09-09Update JIT bindingsPeter Zhu
2025-09-09ZJIT: Implement getblockparamproxy (#14483)Takashi Kokubun
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2025-09-09ZJIT: Optimize `ObjToString` with type guards (#14469)André Luiz Tiago Soares
* failing test for ObjToString optimization with GuardType * profile ObjToString receiver and rewrite with guard * adjust integration tests for objtostring type guard optimization * Implement new GuardTypeNot HIR; objtostring sends to_s directly on profiled nonstrings * codegen for GuardTypeNot * typo fixes * better name for tests; fix side exit reason for GuardTypeNot * revert accidental change * make bindgen * Fix is_string to identify subclasses of String; fix codegen for identifying if val is String
2025-09-08ZJIT: Add RubyVM::ZJIT.reset_stats! method (GH-14479)Randy Stauner
This allows for more precise tracking of stats programmatically which is particularly useful for our nightly benchmarking suite. - Define rust function - Expose to C - Wrap with Ruby API - Add a test
2025-09-08ZJIT: Fix 30k if stmt test (#14446)Aiden Fox Ivey
* ZJIT: Allow label generation above 19 bits * Refactor emit_conditional_jump to use generate_branch * Make branching functionality generic across Label and CodePtr * ZJIT: Add > 19 bit jump test and helper function * Remove an empty line --------- Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2025-09-08ZJIT: Fix backtraces on opt_new (#14461)Takashi Kokubun
2025-09-08ZJIT: Add --zjit-stats=quiet option to collect stats without printing (#14467)Randy Stauner
Similar to YJIT's --yjit-stats=quiet, this option allows ZJIT to collect statistics and make them available via the Ruby API without printing them at exit. This is useful for programmatic access to stats without the output noise. - Added print_stats field to Options struct - Modified option parsing to support --zjit-stats=quiet - Added rb_zjit_print_stats_p primitive to check if stats should be printed - Updated zjit.rb to only register at_exit handler when print_stats is true - Update the help text shown by `ruby --help` to indicate that --zjit-stats now accepts an optional =quiet parameter. - Added test for --zjit-stats=quiet option
2025-09-08Move `IS_TYPED_DATA` in RBasic.flagsJean Boussier
Ref: https://github.com/ruby/ruby/pull/14134#issuecomment-3207733725 We can't safely use low-bit pointer tagging anymore because `RTypedData.type` lines up with `RData.dfree` and there is no aligment guarantee on function pointers, as evidenced by `memcached` and `gpgme` gems. We also can't use FL_USER* for this, because extensions may use these for other purposes. Using a general flag for this is a bit unfortunate, as general flags are hard to come by, however I recently freed several of them, and we still have two or three free ones left.
2025-09-05ZJIT: Stop optimizing toplevel locals (#14458)Takashi Kokubun
2025-09-05ZJIT: Invalidate local variables on EP escape (#14448)Takashi Kokubun
2025-09-04ZJIT: Compile invokesuper with dynamic dispatch (#14444)Takashi Kokubun
Co-authored-by: Max Bernstein <ruby@bernsteinbear.com>
2025-09-04ZJIT: Fix Rust compilation warning (#14443)Stan Lo
This fixes: ``` warning: unused import: `ParseError` --> zjit/src/codegen.rs:20:61 | 20 | use crate::hir::{Const, FrameState, Function, Insn, InsnId, ParseError}; | ^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default ```
2025-09-04ZJIT: Add patchpoint for TracePoint (#14420)Stan Lo
ZJIT: Add patchpoint for TracePoint activation Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2025-09-04ZJIT: Support compiling ISEQs for opt_pc = 0 (#14441)Takashi Kokubun
* ZJIT: Support compiling ISEQs for opt_pc = 0 * Test send with optional arguments
2025-09-03ZJIT: Ensure `clippy` passes and silence unnecessary warnings (#14439)Aiden Fox Ivey
2025-09-03ZJIT: Add missing module doc commentsAiden Fox Ivey
2025-09-03ZJIT: Fix documentation build warningsAiden Fox Ivey
2025-09-03ZJIT: Count exits coming from jit_exception (#14428)Takashi Kokubun
2025-09-03ZJIT: Handle `opt_case_dispatch` insn (#14433)Stan Lo
ZJIT: Handle opt_case_dispatch insn
2025-09-02ZJIT: Use Copy instead of CloneAiden Fox Ivey
2025-09-02ZJIT: Remove unnecessary return statementsAiden Fox Ivey
2025-09-02ZJIT: Remove unnecessary .into callsAiden Fox Ivey
2025-09-02ZJIT: Use copied over map(|x| *x)Aiden Fox Ivey
2025-09-02ZJIT: Use .is_some_andAiden Fox Ivey
2025-09-02ZJIT: Use is_empty over compare with ""Aiden Fox Ivey
2025-09-02ZJIT: Use inspect_err on Result values (#14431)Takashi Kokubun
2025-09-02ZJIT: Clear jit entry from iseqs after TracePoint activation (#14407)Stan Lo
ZJIT: Remove JITed code after TracePoint is enabled
2025-09-02ZJIT: Rename gen_save_pc to gen_prepare_call_with_gc (#14427)Takashi Kokubun
2025-09-02ZJIT: Propagate and count CompileError on exits (#14408)Takashi Kokubun
2025-09-02ZJIT: NewRangeFixnum instruction (#14409)André Luiz Tiago Soares
* Failing optimization tests for NewRangeFixnum * NewRangeFixnum general idea * Use gen_prepare_call_with_gc on gen_new_range_fixnum; add additional hir tests * Remove unused NewRange rewrite trigger when neither range is Fixnum literal * Remove misleading 'profiled' name in range optimization tests * Adjustments as per review comments * Include new_range_fixnum tests * remove non-ASCII character from comments as per PR review * remove non-ASCII character from comments as per PR review
2025-09-02ZJIT: Bump default --zjit-call-threshold to 30 (#14410)Takashi Kokubun
2025-08-29Add rb_jit_vm_unlock and share it in ZJIT and YJITStan Lo
2025-08-29Add rb_jit_vm_lock_then_barrier and share it in ZJIT and YJITStan Lo
2025-08-29Add rb_jit_multi_ractor_p and share it in ZJIT and YJITStan Lo
2025-08-29ZJIT: Report stats for unhandled call typesMax Bernstein
2025-08-29ZJIT: Increment dynamic_send_count for Send tooMax Bernstein
2025-08-29ZJIT: Specialize monomorphic GetIvar (#14388)Max Bernstein
Specialize monomorphic `GetIvar` into: * `GuardType(HeapObject)` * `GuardShape` * `LoadIvarEmbedded` or `LoadIvarExtended` This requires profiling self for `getinstancevariable` (it's not on the operand stack). This also optimizes `GetIvar`s that happen as a result of inlining `attr_reader` and `attr_accessor`. Also move some (newly) shared JIT helpers into jit.c.
2025-08-29ZJIT: Remove special case for defined?(method call) (#14401)Max Bernstein
This was fixed in https://github.com/ruby/ruby/pull/14308 Thanks, Stan, for noticing. Fixes https://github.com/Shopify/ruby/issues/703
2025-08-29ZJIT: Repurpose ExitCounters for unhandled YARV insns (#14392)Takashi Kokubun
2025-08-28ZJIT: Compile Insn::SendTakashi Kokubun
2025-08-28ZJIT: Add code_region_bytes stat (#14389)Takashi Kokubun
* ZJIT: Add code_region_bytes stat * Share more logic among --zjit and --zjit-stats
2025-08-28ZJIT: Prepare getglobal for non-leaf call (#14387)Stan Lo
Depending on the user's warning level, getting certain global variables may lead to calling `Warning#warn`, which can be redefined by the user. This fixes another `bootstraptest/test_yjit.rb` failure.
2025-08-28ZJIT: Fix a flipped statTakashi Kokubun
I'm sorry. Another follow-up on https://github.com/ruby/ruby/pull/14378
2025-08-28ZJIT: Fix a typoTakashi Kokubun
follow-up on https://github.com/ruby/ruby/pull/14378
2025-08-28ZJIT: Disable profiling in compile_iseq (#14385)Max Bernstein
This catches both the interpreter-JIT and JIT-JIT cases. Fixes https://github.com/Shopify/ruby/issues/719
2025-08-28ZJIT: Generate code for ArrayExtendMax Bernstein