<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/zjit.h, branch master</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>ZJIT: Share a single JITFrame across all C method frames (#16988)</title>
<updated>2026-05-15T19:44:42+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-05-15T19:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=985fa1bdaa23d2c84aebb7db55b674c0b9993f57'/>
<id>985fa1bdaa23d2c84aebb7db55b674c0b9993f57</id>
<content type='text'>
* ZJIT: Share a single JITFrame across all C method frames

Replace the per-call JITFrame::new_cfunc allocation in gen_push_frame
with a sentinel value (ZJIT_JIT_RETURN_C_FRAME) stored in cfp-&gt;jit_return.
CFP_ZJIT_FRAME now returns a pointer to a single static rb_zjit_c_frame
(pc/iseq both NULL) when it sees the sentinel.

The CFP accessor is split into CFP_ZJIT_FRAME_P (predicate) and
CFP_ZJIT_FRAME (typed accessor that dereferences safely) so callers don't
have to know about the sentinel encoding. ISEQ frames are unchanged: they
still hand cfp-&gt;jit_return a heap-allocated JITFrame pointer.

* Move a pointer location for CFP_ZJIT_FRAME</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ZJIT: Share a single JITFrame across all C method frames

Replace the per-call JITFrame::new_cfunc allocation in gen_push_frame
with a sentinel value (ZJIT_JIT_RETURN_C_FRAME) stored in cfp-&gt;jit_return.
CFP_ZJIT_FRAME now returns a pointer to a single static rb_zjit_c_frame
(pc/iseq both NULL) when it sees the sentinel.

The CFP accessor is split into CFP_ZJIT_FRAME_P (predicate) and
CFP_ZJIT_FRAME (typed accessor that dereferences safely) so callers don't
have to know about the sentinel encoding. ISEQ frames are unchanged: they
still hand cfp-&gt;jit_return a heap-allocated JITFrame pointer.

* Move a pointer location for CFP_ZJIT_FRAME</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: More recognizable JIT return poison, assert only when RUBY_DEBUG</title>
<updated>2026-04-30T00:08:34+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2026-04-09T14:44:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d61424bb8e2e43d5ee6da72e260bbb103319a6ba'/>
<id>d61424bb8e2e43d5ee6da72e260bbb103319a6ba</id>
<content type='text'>
A good poison value gives a recognizable fault address if someone
erroneously dereferences. Asserting the pointer is not poison shouldn't
be necessary, so move it to RUBY_DEBUG builds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A good poison value gives a recognizable fault address if someone
erroneously dereferences. Asserting the pointer is not poison shouldn't
be necessary, so move it to RUBY_DEBUG builds.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Stop checking rb_zjit_enabled_p on YJIT callbacks (#16648)</title>
<updated>2026-04-02T21:34:07+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-04-02T21:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e957b3a9d0aa57fec5a62f4b7f3a2f73627a0e66'/>
<id>e957b3a9d0aa57fec5a62f4b7f3a2f73627a0e66</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Hook into GC W^X callbacks for compaction (#16635)</title>
<updated>2026-04-01T23:29:27+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-04-01T23:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=25ca647db5ea7ee7b092d0501ace5134050eba30'/>
<id>25ca647db5ea7ee7b092d0501ace5134050eba30</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename CFP_HAS_JIT_RETURN to CFP_JIT_RETURN</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-27T22:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=634707a7255f132eb486eaf57473925c288ef7bd'/>
<id>634707a7255f132eb486eaf57473925c288ef7bd</id>
<content type='text'>
Return the pointer directly instead of a bool, for consistency with
CFP_ISEQ and CFP_PC. The pointer is truthy in if conditions so all
callers work unchanged.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return the pointer directly instead of a bool, for consistency with
CFP_ISEQ and CFP_PC. The pointer is truthy in if conditions so all
callers work unchanged.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename rb_cfp_iseq to CFP_ISEQ and rb_cfp_pc to CFP_PC</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-27T22:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee60b99b2f76a7c8810675a3634eae1935cc8261'/>
<id>ee60b99b2f76a7c8810675a3634eae1935cc8261</id>
<content type='text'>
Rename for consistency with ISEQ_BODY naming convention. Remove the
separate rb_cfp_has_iseq/rb_cfp_has_pc wrappers — CFP_ISEQ and CFP_PC
return NULL for missing values, which works directly in if conditions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename for consistency with ISEQ_BODY naming convention. Remove the
separate rb_cfp_has_iseq/rb_cfp_has_pc wrappers — CFP_ISEQ and CFP_PC
return NULL for missing values, which works directly in if conditions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename cfp-&gt;iseq to cfp-&gt;_iseq and rb_zjit_cfp_iseq to rb_cfp_iseq</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-27T21:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=226f37059ec5f3ea3a1417e0bab630c64dbc8ac3'/>
<id>226f37059ec5f3ea3a1417e0bab630c64dbc8ac3</id>
<content type='text'>
Per tenderlove's review, every cfp-&gt;iseq read should go through an
accessor that accounts for JITFrame. Rename the field to _iseq so
direct access causes a compile error, and rename the accessors to
drop the zjit prefix (rb_cfp_iseq, rb_cfp_has_iseq, rb_cfp_pc,
rb_cfp_has_pc).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per tenderlove's review, every cfp-&gt;iseq read should go through an
accessor that accounts for JITFrame. Rename the field to _iseq so
direct access causes a compile error, and rename the accessors to
drop the zjit prefix (rb_cfp_iseq, rb_cfp_has_iseq, rb_cfp_pc,
rb_cfp_has_pc).
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Have JITFrame relocate itself via Rust function</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-27T00:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4e5b0d3132c39b690ac50d7a49e96a95b8271067'/>
<id>4e5b0d3132c39b690ac50d7a49e96a95b8271067</id>
<content type='text'>
Expose rb_zjit_jit_frame_update_references so vm.c can call into Rust
to relocate the iseq pointer during GC compaction, instead of manually
manipulating JITFrame fields in C. This keeps JITFrame field access
consolidated in Rust.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Expose rb_zjit_jit_frame_update_references so vm.c can call into Rust
to relocate the iseq pointer during GC compaction, instead of manually
manipulating JITFrame fields in C. This keeps JITFrame field access
consolidated in Rust.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Define JITFrame struct in C and import via bindgen</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-27T00:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bfcc31ab11686ea85b3785b5664c267f56bfac0d'/>
<id>bfcc31ab11686ea85b3785b5664c267f56bfac0d</id>
<content type='text'>
Make zjit.h the single source of truth for the JITFrame struct layout.
Remove the manual #[repr(C)] definition from jit_frame.rs and replace
it with a type alias to the bindgen-generated zjit_jit_frame.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make zjit.h the single source of truth for the JITFrame struct layout.
Remove the manual #[repr(C)] definition from jit_frame.rs and replace
it with a type alias to the bindgen-generated zjit_jit_frame.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Simplify cfp accessor functions in zjit.h</title>
<updated>2026-03-27T23:26:12+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-03-26T22:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9c7c28ff67ae6e79cfb7628dcc44607f01a131d2'/>
<id>9c7c28ff67ae6e79cfb7628dcc44607f01a131d2</id>
<content type='text'>
Remove redundant rb_zjit_enabled_p checks from rb_zjit_cfp_pc and
rb_zjit_cfp_iseq since CFP_HAS_JIT_RETURN already checks it. Rewrite
rb_zjit_cfp_has_iseq and rb_zjit_cfp_has_pc as thin wrappers around
rb_zjit_cfp_iseq and rb_zjit_cfp_pc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove redundant rb_zjit_enabled_p checks from rb_zjit_cfp_pc and
rb_zjit_cfp_iseq since CFP_HAS_JIT_RETURN already checks it. Rewrite
rb_zjit_cfp_has_iseq and rb_zjit_cfp_has_pc as thin wrappers around
rb_zjit_cfp_iseq and rb_zjit_cfp_pc.
</pre>
</div>
</content>
</entry>
</feed>
