<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/zjit/src/hir.rs, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>ZJIT: Don't mark control-flow opcodes as invalidating locals (#15694)</title>
<updated>2025-12-24T22:37:25+00:00</updated>
<author>
<name>Max Bernstein</name>
<email>rubybugs@bernsteinbear.com</email>
</author>
<published>2025-12-24T22:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3e82da723241b7205dc2b7706c66e9ead1826cde'/>
<id>3e82da723241b7205dc2b7706c66e9ead1826cde</id>
<content type='text'>
jump, branchif, etc don't invalidate locals in the JIT; they might in the interpreter because they can execute arbitrary code, but the JIT side exits before that happens.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
jump, branchif, etc don't invalidate locals in the JIT; they might in the interpreter because they can execute arbitrary code, but the JIT side exits before that happens.</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Fix test failures from line number of `Primitive` shifting</title>
<updated>2025-12-16T03:18:44+00:00</updated>
<author>
<name>Alan Wu</name>
<email>alanwu@ruby-lang.org</email>
</author>
<published>2025-12-16T03:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3b3ab338516c9af009300761382f01a6beff4dd0'/>
<id>3b3ab338516c9af009300761382f01a6beff4dd0</id>
<content type='text'>
This can happen with documentation updates and we don't want
those to trip on ZJIT tests.

Redact the whole name since names like "_bi342" aren't that helpful
anyways.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can happen with documentation updates and we don't want
those to trip on ZJIT tests.

Redact the whole name since names like "_bi342" aren't that helpful
anyways.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Don't inline non-parameter locals</title>
<updated>2025-12-12T23:55:18+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2025-12-12T21:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8f81d2b5c3d7e41a116b3b81a628b998d8e283be'/>
<id>8f81d2b5c3d7e41a116b3b81a628b998d8e283be</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Only optimize `[]` and `[]=` for exact Hash, not Hash subclasses</title>
<updated>2025-12-12T18:26:31+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-12-12T17:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f900e3ce9cefa76bc2c94e0e591acd51bf0e638'/>
<id>4f900e3ce9cefa76bc2c94e0e591acd51bf0e638</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Inline `Hash#[]=`</title>
<updated>2025-12-12T18:26:31+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-12-11T21:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=309d6ef9c3792d1116809620a01240c7b8f4406e'/>
<id>309d6ef9c3792d1116809620a01240c7b8f4406e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Add Shape type to HIR (#15528)</title>
<updated>2025-12-12T18:14:00+00:00</updated>
<author>
<name>Max Bernstein</name>
<email>rubybugs@bernsteinbear.com</email>
</author>
<published>2025-12-12T18:14:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a0596b9a51121ebb7d3db06c438bf4182507c2a'/>
<id>3a0596b9a51121ebb7d3db06c438bf4182507c2a</id>
<content type='text'>
It's just a nicety (they fit fine as CUInt32) but this makes printing
look nicer in real execution and also in tests (helps with #15489).

Co-authored-by: Randy Stauner &lt;randy@r4s6.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's just a nicety (they fit fine as CUInt32) but this makes printing
look nicer in real execution and also in tests (helps with #15489).

Co-authored-by: Randy Stauner &lt;randy@r4s6.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Don't specialize calls with kwsplat (#15513)</title>
<updated>2025-12-12T01:28:11+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2025-12-12T01:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a76625915e57eb328d23ae5dd621d8bf45b30e0'/>
<id>3a76625915e57eb328d23ae5dd621d8bf45b30e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Check method visibility when optimizing sends (#15501)</title>
<updated>2025-12-11T21:12:00+00:00</updated>
<author>
<name>Max Bernstein</name>
<email>rubybugs@bernsteinbear.com</email>
</author>
<published>2025-12-11T21:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=64062792c61d13d1eca9f637db3ed7da12a61154'/>
<id>64062792c61d13d1eca9f637db3ed7da12a61154</id>
<content type='text'>
Fix https://github.com/Shopify/ruby/issues/874</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix https://github.com/Shopify/ruby/issues/874</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Don't fold LoadField with negative offsets and use byte_add</title>
<updated>2025-12-10T22:03:26+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-12-10T21:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b208f46f48f88cf4d0b813edbfab07214d085e89'/>
<id>b208f46f48f88cf4d0b813edbfab07214d085e89</id>
<content type='text'>
No point doing the manual size unit conversion for add. Sorry, no new
tests since there is no way to generate a LoadField with a negative
offset from ruby code AFAICT. Careful with the `as` casts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No point doing the manual size unit conversion for add. Sorry, no new
tests since there is no way to generate a LoadField with a negative
offset from ruby code AFAICT. Careful with the `as` casts.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Fold LoadField on frozen objects to constants (#15483)</title>
<updated>2025-12-10T21:18:08+00:00</updated>
<author>
<name>Tobias Lütke</name>
<email>tobi@shopify.com</email>
</author>
<published>2025-12-10T21:18:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c8909030974772b4f19742bac55875e32674d27f'/>
<id>c8909030974772b4f19742bac55875e32674d27f</id>
<content type='text'>
* ZJIT: Fold LoadField on frozen objects to constants

When accessing instance variables from frozen objects via attr_reader/
attr_accessor, fold the LoadField instruction to a constant at compile
time. This enables further optimizations like constant propagation.

- Add fold_getinstancevariable_frozen optimization in Function::optimize
- Check if receiver type has a known ruby_object() that is frozen
- Read the field value at compile time and replace with Const instruction
- Add 10 unit tests covering various value types (fixnum, string, symbol,
  nil, true/false) and negative cases (unfrozen, dynamic receiver)

* Run zjit-test-update

* Add a test that we don't fold non-BasicObject

* Small cleanups

---------

Co-authored-by: Max Bernstein &lt;ruby@bernsteinbear.com&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ZJIT: Fold LoadField on frozen objects to constants

When accessing instance variables from frozen objects via attr_reader/
attr_accessor, fold the LoadField instruction to a constant at compile
time. This enables further optimizations like constant propagation.

- Add fold_getinstancevariable_frozen optimization in Function::optimize
- Check if receiver type has a known ruby_object() that is frozen
- Read the field value at compile time and replace with Const instruction
- Add 10 unit tests covering various value types (fixnum, string, symbol,
  nil, true/false) and negative cases (unfrozen, dynamic receiver)

* Run zjit-test-update

* Add a test that we don't fold non-BasicObject

* Small cleanups

---------

Co-authored-by: Max Bernstein &lt;ruby@bernsteinbear.com&gt;
Co-authored-by: Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;</pre>
</div>
</content>
</entry>
</feed>
