<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/yjit/src/codegen.rs, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 9168cad4d63a5d281d443bde4edea6be213b0b25: [Backport #21266]</title>
<updated>2025-12-16T23:53:40+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-12-16T23:53:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d8f087b581735ec250b8671c3574fa4d5b16ae54'/>
<id>d8f087b581735ec250b8671c3574fa4d5b16ae54</id>
<content type='text'>
	[PATCH] YJIT: Bail out if proc would be stored above stack top

	Fixes [Bug #21266].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[PATCH] YJIT: Bail out if proc would be stored above stack top

	Fixes [Bug #21266].
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix panic from overly loose filtering in identity method inlining</title>
<updated>2025-12-12T23:43:41+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=f19e9c6699150d56853ba1a33f6149d7588c8478'/>
<id>f19e9c6699150d56853ba1a33f6149d7588c8478</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-12T23:43:41+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=628a94104768b294ae8068c7bb39ab9e495fdd94'/>
<id>628a94104768b294ae8068c7bb39ab9e495fdd94</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 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.

[Backport #21772]
</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 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.

[Backport #21772]
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Abort expandarray optimization if method_missing is defined</title>
<updated>2025-12-01T17:45:35+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=28b2e2ede97b569c2f6121e7808975fbd5c6f298'/>
<id>28b2e2ede97b569c2f6121e7808975fbd5c6f298</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: Fix stack handling in rb_str_dup</title>
<updated>2025-11-14T18:07:34+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=0b559eab0447905a784092824e5ea0999018cd01'/>
<id>0b559eab0447905a784092824e5ea0999018cd01</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>YJIT: Fix `defined?(yield)` and `block_given?` at top level</title>
<updated>2025-10-22T20:53:20+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=3afa38d0ee34a453d7c53d4512a8f14d25d23f57'/>
<id>3afa38d0ee34a453d7c53d4512a8f14d25d23f57</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: Print more disassembly in release builds</title>
<updated>2025-09-10T22:35:06+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-09-10T21:02:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9cd1ac404e72587952d019df167e7793924699d6'/>
<id>9cd1ac404e72587952d019df167e7793924699d6</id>
<content type='text'>
These `#[cfg(feature = "disasm")]` were unnecessary and we can provide
the information like ruby source location regardless of the availability
of capstone.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These `#[cfg(feature = "disasm")]` were unnecessary and we can provide
the information like ruby source location regardless of the availability
of capstone.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Remove dead code: `asm_comment!` checks `--yjit-dump-disasm`</title>
<updated>2025-09-10T22:35:06+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-09-10T21:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c866b9027b7429b402ed272ebaebb6c7831e3cb5'/>
<id>c866b9027b7429b402ed272ebaebb6c7831e3cb5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Add more information to an assert message (#14481)</title>
<updated>2025-09-08T20:30:57+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-09-08T20:30:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ecebf1687dfd8defd44ff6514329224de4a598b1'/>
<id>ecebf1687dfd8defd44ff6514329224de4a598b1</id>
<content type='text'>
YJIT: Add more information to an assert message in jit_guard_known_class (#14480)

---------

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YJIT: Add more information to an assert message in jit_guard_known_class (#14480)

---------

Co-authored-by: Alan Wu &lt;XrXr@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Explicitly specify C ABI to fix Rust warning</title>
<updated>2025-07-17T16:23:16+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2025-01-30T23:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d713896f19517ab688b13174e6346a87fd9e01ee'/>
<id>d713896f19517ab688b13174e6346a87fd9e01ee</id>
<content type='text'>
Backport of 7e733ca55168e3b1f10b685f6e9a52cf1deb5aff to
fix [Bug #21514].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of 7e733ca55168e3b1f10b685f6e9a52cf1deb5aff to
fix [Bug #21514].
</pre>
</div>
</content>
</entry>
</feed>
