<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/bootstraptest/test_yjit.rb, 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>YJIT: Bail out if proc would be stored above stack top</title>
<updated>2025-12-16T04:05:27+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2025-12-11T22:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9168cad4d63a5d281d443bde4edea6be213b0b25'/>
<id>9168cad4d63a5d281d443bde4edea6be213b0b25</id>
<content type='text'>
Fixes [Bug #21266].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #21266].
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix panic from overly loose filtering in identity method inlining</title>
<updated>2025-12-13T02:23:24+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-12-12T23:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e1f5e61d6b1b9e937a58afcae644da0917f6dd49'/>
<id>e1f5e61d6b1b9e937a58afcae644da0917f6dd49</id>
<content type='text'>
Credits to @rwstauner for noticing this issue in GH-15533.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Credits to @rwstauner for noticing this issue in GH-15533.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Add missing local variable type update for fallback setlocal blocks</title>
<updated>2025-12-12T20:29:04+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-12-12T18:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2884f53519c4b86072d5fc3b41a71cee697af8ba'/>
<id>2884f53519c4b86072d5fc3b41a71cee697af8ba</id>
<content type='text'>
Previously, the chain_depth&gt;0 version of setlocal blocks did not
update the type of the local variable in the context. This can leave
the context with stale type information and trigger panics like in
[Bug #21772] or lead to miscompilation.

To trigger the issue, YJIT needs to see the same ISEQ before and after
environment escape and have tracked type info before the escape. To
trigger in ISEQs that do not send with a block, it probably requires
Kernel#binding or the use of include/ruby/debug.h APIs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the chain_depth&gt;0 version of setlocal blocks did not
update the type of the local variable in the context. This can leave
the context with stale type information and trigger panics like in
[Bug #21772] or lead to miscompilation.

To trigger the issue, YJIT needs to see the same ISEQ before and after
environment escape and have tracked type info before the escape. To
trigger in ISEQs that do not send with a block, it probably requires
Kernel#binding or the use of include/ruby/debug.h APIs.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Abort expandarray optimization if method_missing is defined</title>
<updated>2025-11-26T20:56:27+00:00</updated>
<author>
<name>Randy Stauner</name>
<email>randy@r4s6.net</email>
</author>
<published>2025-11-26T02:29:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5f55c9c8fb8f401537e7121171747196e66c3ba0'/>
<id>5f55c9c8fb8f401537e7121171747196e66c3ba0</id>
<content type='text'>
Fixes: [Bug #21707]
[AW: rewrote comments]
Co-authored-by: Alan Wu &lt;alanwu@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: [Bug #21707]
[AW: rewrote comments]
Co-authored-by: Alan Wu &lt;alanwu@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: omit single ractor mode assumption for `proc#call` (#15092)</title>
<updated>2025-11-18T19:24:49+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gruber@shopify.com</email>
</author>
<published>2025-11-18T19:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ff2d2fc1bd9aa6a768e85276d7ba69bbe5af9572'/>
<id>ff2d2fc1bd9aa6a768e85276d7ba69bbe5af9572</id>
<content type='text'>
The comptime receiver, which is a proc, is either shareable or from this
ractor so we don't need to assume single-ractor mode. We should never get
the "defined with an un-shareable Proc in a different ractor" error.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The comptime receiver, which is a proc, is either shareable or from this
ractor so we don't need to assume single-ractor mode. We should never get
the "defined with an un-shareable Proc in a different ractor" error.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix stack handling in rb_str_dup</title>
<updated>2025-11-14T17:29:09+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-11-13T20:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e4295bc3f763d220a944ed353eaeda2c1c1b88cd'/>
<id>e4295bc3f763d220a944ed353eaeda2c1c1b88cd</id>
<content type='text'>
Previously because we did a stack_push before ccall, in some cases we
could end up pushing an uninitialized value to the VM stack when
spilling regs as part of the ccall.

Co-authored-by: Luke Gruber &lt;luke.gru@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously because we did a stack_push before ccall, in some cases we
could end up pushing an uninitialized value to the VM stack when
spilling regs as part of the ccall.

Co-authored-by: Luke Gruber &lt;luke.gru@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Follow up cleanup for `opt_(aref|aset)_with` removal</title>
<updated>2025-08-26T22:03:47+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-08-26T20:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c7ef8df8516aa27a78a1f3b6dff78c523eca259d'/>
<id>c7ef8df8516aa27a78a1f3b6dff78c523eca259d</id>
<content type='text'>
Just removing some unneeded tests, outdated comments...etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just removing some unneeded tests, outdated comments...etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix `defined?(yield)` and `block_given?` at top level</title>
<updated>2025-08-14T21:01:11+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-08-13T16:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=38558dd95e6443a8412304718ad77a331c185f5d'/>
<id>38558dd95e6443a8412304718ad77a331c185f5d</id>
<content type='text'>
Previously, YJIT returned truthy for the block given query at the top
level. That's incorrect because the top level script never receives a
block, and `yield` is a syntax error there.

Inside methods, the number of hops to get from `iseq` to
`iseq-&gt;body-&gt;local_iseq` is the same as the number of
`VM_ENV_PREV_EP(ep)` hops to get to an environment with
`VM_ENV_FLAG_LOCAL`. YJIT and the interpreter both rely on this as can
be seen in get_lvar_level(). However, this identity does not hold for
the top level frame because of vm_set_eval_stack(), which sets up
`TOPLEVEL_BINDING`.

Since only methods can take a block that `yield` goes to, have ISEQs
that are the child of a non-method ISEQ return falsy for the block given
query. This fixes the issue for the top level script and is an
optimization for non-method contexts such as inside `ISEQ_TYPE_CLASS`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, YJIT returned truthy for the block given query at the top
level. That's incorrect because the top level script never receives a
block, and `yield` is a syntax error there.

Inside methods, the number of hops to get from `iseq` to
`iseq-&gt;body-&gt;local_iseq` is the same as the number of
`VM_ENV_PREV_EP(ep)` hops to get to an environment with
`VM_ENV_FLAG_LOCAL`. YJIT and the interpreter both rely on this as can
be seen in get_lvar_level(). However, this identity does not hold for
the top level frame because of vm_set_eval_stack(), which sets up
`TOPLEVEL_BINDING`.

Since only methods can take a block that `yield` goes to, have ISEQs
that are the child of a non-method ISEQ return falsy for the block given
query. This fixes the issue for the top level script and is an
optimization for non-method contexts such as inside `ISEQ_TYPE_CLASS`.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Remove a dead test for getinlinecaches (#14033)</title>
<updated>2025-07-30T16:33:25+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2025-07-30T16:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4263c49d1ce61a4e8d1a84cc144d4185ccf935f9'/>
<id>4263c49d1ce61a4e8d1a84cc144d4185ccf935f9</id>
<content type='text'>
The test was added in #5221 4 years ago but:

1. The insn it targets was removed in 2022 in #6187
2. The YJIT API `blocks_for` seems to be dropped in 2022 when it switched
   to use Rust in #5826

So this test has not been run in more than 3 years and can't be run
anymore. I think we can remove it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test was added in #5221 4 years ago but:

1. The insn it targets was removed in 2022 in #6187
2. The YJIT API `blocks_for` seems to be dropped in 2022 when it switched
   to use Rust in #5826

So this test has not been run in more than 3 years and can't be run
anymore. I think we can remove it.</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of FL_EXIVAR</title>
<updated>2025-06-13T21:50:30+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-13T15:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=15084fbc3c10d21769dd61cd1cd55b2662fa8845'/>
<id>15084fbc3c10d21769dd61cd1cd55b2662fa8845</id>
<content type='text'>
Now that the shape_id gives us all the same information, it's no
longer needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the shape_id gives us all the same information, it's no
longer needed.
</pre>
</div>
</content>
</entry>
</feed>
