| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2025-07-08 | ZJIT: Support guarding *Exact types (#13797) | Stan Lo | |
| ZJIT already can generate guard type instructions for *Exact types. For example: ``` def test(strings) strings.map do |string| string.bytesize end end test(["foo", "bar"]) ``` ``` HIR: fn block in test: bb0(v0:BasicObject, v1:BasicObject): PatchPoint MethodRedefined(String@0x1014be890, bytesize@0x19f1) v7:StringExact = GuardType v1, StringExact v8:Fixnum = CCall bytesize@0x16fa4cc18, v7 Return v8 ``` But zjit only supported guarding fixnums so this script would panic. This commit adds support for guarding *Exact types. | |||
| 2025-07-08 | ZJIT: Use BitSet in HIR | Max Bernstein | |
| 2025-07-08 | ZJIT: Add a BitSet type | Max Bernstein | |
| 2025-07-08 | ZJIT: Use nil? optimization to test guard generation against different types | Stan Lo | |
| 2025-07-08 | ZJIT: Profile `nil?` calls | Stan Lo | |
| This allows ZJIT to profile `nil?` calls and create type guards for its receiver. - Add `zjit_profile` to `opt_nil_p` insn - Start profiling `opt_nil_p` calls - Use `runtime_exact_ruby_class` instead of `exact_ruby_class` to determine the profiled receiver class | |||
| 2025-07-08 | ZJIT: Make type definition code more consistent | Stan Lo | |
| 2025-07-08 | ZJIT: More accurately model Class types | Stan Lo | |
| 2025-07-08 | ZJIT: Support inference of ModuleExact type | Stan Lo | |
| 2025-07-07 | ZJIT: Fix Rust warnings (#13813) | Stan Lo | |
| 2025-07-07 | ZJIT: Add opnds macro for Vec<InsnId> to Vec<Opnd> (#13805) | Daniel Colson | |
| Along the same lines as the `opnd` macro we already have, but for a `Vec<InsnId>` instead of a single `InsnId`. This gets a few for loops and `jit.get_opnd` calls out of the `gen_` functions. | |||
| 2025-07-07 | ZJIT: Add a simple HIR validator (#13780) | Ken Jin | |
| This PR adds a simple validator for ZJIT's HIR. See issue https://github.com/Shopify/ruby/issues/591 | |||
| 2025-07-07 | ZJIT: Avoid double negative in Mem debug | Daniel Colson | |
| Prior to this commit the debug output for negative offsets would look like: ``` Mem64[Reg(3) - -8 ``` That makes it look like we're adding instead of subtracting. After this commit we'll print: ``` Mem64[Reg(3) - 8 ``` | |||
| 2025-07-03 | Support inference of ClassExact type | Stan Lo | |
| 2025-07-03 | Add missed runtime_exact_ruby_class case for Regexp | Stan Lo | |
| 2025-07-03 | ZJIT: Panic on BOP redefinition only when needed (#13782) | Takashi Kokubun | |
| 2025-07-03 | ZJIT: Bail out on register spill (#13773) | Takashi Kokubun | |
| 2025-07-02 | ZJIT: Reject ISEQs with too-large stack_max (#13770) | Takashi Kokubun | |
| 2025-07-02 | ZJIT: Add reason for SideExit (#13768) | Max Bernstein | |
| This makes it clearer what is unimplemented when looking at HIR dumps. | |||
| 2025-07-02 | ZJIT: Avoid panicing with "Option::unwrap() on None" (#13762) | Takashi Kokubun | |
| 2025-07-02 | ZJIT: Support spilling basic block arguments (#13761) | Takashi Kokubun | |
| Co-authored-by: Max Bernstein <max@bernsteinbear.com> | |||
| 2025-07-02 | ZJIT: Annotate NilClass#nil? and Kernel#nil? | Stan Lo | |
| These methods return fixed `true` or `false` so we can be certain about their return types. | |||
| 2025-07-03 | ZJIT: `throw` to HIR | Alan Wu | |
| 2025-07-03 | ZJIT: Use initialization shorthand | Alan Wu | |
| 2025-07-02 | ZJIT: Support `Regexp` type (#13760) | Stan Lo | |
| 2025-07-01 | ZJIT: Shorten Debug print for 64-bit VReg (#13763) | Takashi Kokubun | |
| 2025-07-01 | ZJIT: Stop tracking EP == BP assumption on JIT entry (#13752) | Takashi Kokubun | |
| * ZJIT: Stop tracking EP == BP assumption on JIT entry * Enable test_method.rb as well | |||
| 2025-06-30 | ZJIT: Add codegen for IsNil | ywenc | |
| 2025-06-30 | ZJIT: Add IsNil optimization and tests for optimized hir | ywenc | |
| 2025-06-30 | ZJIT: Rename Ruby<->Rust functions for clarity | Max Bernstein | |
| No need to be so terse. | |||
| 2025-06-30 | ZJIT: Pretty-print symbols in HIR dump | Max Bernstein | |
| This lets us better see what is going on, for example in pattern matching code, which has a bunch of dynamic method lookups and `respond_to?` sends. | |||
| 2025-06-30 | ZJIT: Mark GetLocal as having no effects (#13750) | Max Bernstein | |
| This removes the GetLocal of l3 from: def test l3 = 3 1.times do |l2| _ = l3 1 end end | |||
| 2025-06-30 | ZJIT: Don't compile functions with unhandled parameter types (#13749) | Max Bernstein | |
| 2025-06-30 | ZJIT: Add new ZJIT types for Set (#13743) | Stan Lo | |
| 2025-06-30 | ZJIT: setglobal should not return output (#13744) | Takashi Kokubun | |
| * ZJIT: setglobal should not return output * Let the caller wrap Some | |||
| 2025-06-28 | ZJIT: Codegen for `defined?(yield)` | Alan Wu | |
| Lots of stdlib methods such as Integer#times and Kernel#then use this, so at least this will make writing tests slightly easier. | |||
| 2025-06-28 | ZJIT: Use `std::fmt::Display` when codegen for instruction fails | Alan Wu | |
| It's nicer since e.g. you get text representation of enums like `defined_type` instead of just a number. | |||
| 2025-06-27 | ZJIT: Add TODOs and omitted test for nested scope local access | Alan Wu | |
| 2025-06-27 | ZJIT: Function::find(): Use find_vec!() more | Alan Wu | |
| 2025-06-27 | ZJIT: Function::find(): Use clone() instead of doing it manually | Alan Wu | |
| 2025-06-27 | ZJIT: Add codegen for GetLocal and SetLocal | Alan Wu | |
| They're only used when level≠0. Same EP hopping logic as interpreter and YJIT. Change assert_compiles() to get ISeq by method name since the old code didn't support methods defined using define_method() which I need for the new test. | |||
| 2025-06-27 | ZJIT: `getlocal` and `setlocal` to HIR | Alan Wu | |
| 2025-06-26 | ZJIT: Stop loading an extra parameter (#13719) | Takashi Kokubun | |
| 2025-06-26 | ZJIT: Disable profiling instructions before asserting opcodes in tests (#13720) | Max Bernstein | |
| 2025-06-24 | Remove trailing spaces | Nobuyoshi Nakada | |
| 2025-06-23 | ZJIT: Parse putspecialobject(VMCore) into Const (#13683) | Max Bernstein | |
| This way we get more information in HIR for the optimizer. Fix https://github.com/Shopify/ruby/issues/587 | |||
| 2025-06-23 | ZJIT: Optimize frozen array aref (#13666) | Max Bernstein | |
| If we have a frozen array `[..., a, ...]` and a compile-time fixnum index `i`, we can do the array load at compile-time. | |||
| 2025-06-24 | ZJIT: `anytostring` to HIR (GH-13658) | ywenc | |
| Pop two values from the stack, return the first if it is a string, otherwise return string coercion of the second Also piggybacks a fix for string subclasses skipping `to_s` for `objtostring`. Co-authored-by: composerinteralia <composerinteralia@github.com> | |||
| 2025-06-21 | ZJIT: Move ccall comments near ccall instructions (#13662) | Max Bernstein | |
| Don't confuse them with other nearby instructions. | |||
| 2025-06-20 | ZJIT: Typofix (#13665) | Hiroshi SHIBATA | |
| 2025-06-20 | ZJIT: Add pass to clean CFG (#13655) | Max Bernstein | |
| We can fuse linked lists of blocks. This can be run any time, improves future analyses, improves codegen, and also makes the HIR output look nicer. Inspired by my implementation of CleanCFG for Cinder, which was itself inspired by Brett Simmers' implementation in HHVM. Notes: Merged-By: tekknolagi <donotemailthisaddress@bernsteinbear.com> | |||
