<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/zjit/bindgen, 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: Delete binding for unused rb_reg_new_ary()</title>
<updated>2026-05-26T17:04:22+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2026-05-23T20:11:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b1bf8f31ca1ae1f784c3d3319090e1360177b109'/>
<id>b1bf8f31ca1ae1f784c3d3319090e1360177b109</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Call only one function for newhash/toregexp (#17092)</title>
<updated>2026-05-23T00:08:49+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2026-05-23T00:08:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5855d61ee4c44a4e1b9a6244fb4a3dc7caafa7bf'/>
<id>5855d61ee4c44a4e1b9a6244fb4a3dc7caafa7bf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>shapes: Rename `TOO_COMPLEX` in just `COMPLEX`</title>
<updated>2026-05-06T08:10:16+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2026-05-06T06:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4eeec614bb9379ebac78ecc4fa98238a8311d9eb'/>
<id>4eeec614bb9379ebac78ecc4fa98238a8311d9eb</id>
<content type='text'>
The `too_` prefix wasn't consistently used and just make the
thing longer for no benefit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `too_` prefix wasn't consistently used and just make the
thing longer for no benefit.
</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>ZJIT: Fix bindgen ordering for rb_flo_to_i</title>
<updated>2026-04-15T22:01:02+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-04-14T19:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=429c499270e997d8307c57a0ca35ba0655f77db0'/>
<id>429c499270e997d8307c57a0ca35ba0655f77db0</id>
<content type='text'>
The zjit-bindgen CI check regenerates cruby_bindings.inc.rs from
headers and diffs against the committed file. Since rb_flo_to_i is
declared next to rb_float_plus/minus/mul/div in internal/numeric.h,
bindgen emits it there. Match that order in both the allowlist and
the generated output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The zjit-bindgen CI check regenerates cruby_bindings.inc.rs from
headers and diffs against the committed file. Since rb_flo_to_i is
declared next to rb_float_plus/minus/mul/div in internal/numeric.h,
bindgen emits it there. Match that order in both the allowlist and
the generated output.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Keep flo_to_i static, add rb_flo_to_i public wrapper</title>
<updated>2026-04-15T22:01:02+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-04-14T18:38:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03f1b569b13a00281e5974eaca2c2359dab96525'/>
<id>03f1b569b13a00281e5974eaca2c2359dab96525</id>
<content type='text'>
The previous commit exposed flo_to_i as a non-static global, which
tripped tool/leaked-globals because it lacks the rb_ prefix.

Keep flo_to_i static and add a new public wrapper rb_flo_to_i in
numeric.c that delegates to it. ZJIT now calls rb_flo_to_i directly
from Rust (no zjit.c wrapper needed).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous commit exposed flo_to_i as a non-static global, which
tripped tool/leaked-globals because it lacks the rb_ prefix.

Keep flo_to_i static and add a new public wrapper rb_flo_to_i in
numeric.c that delegates to it. ZJIT now calls rb_flo_to_i directly
from Rust (no zjit.c wrapper needed).
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Move flo_to_i helper to zjit.c and use original flo_to_i</title>
<updated>2026-04-15T22:01:02+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-04-14T18:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aaad9e0f0640c4efe3987b2154c877ba108fc0a7'/>
<id>aaad9e0f0640c4efe3987b2154c877ba108fc0a7</id>
<content type='text'>
Address review feedback:
1. Move the helper from jit.c (shared YJIT/ZJIT glue) to zjit.c since
   it is only used by ZJIT.
2. Instead of duplicating the truncation logic, export flo_to_i from
   numeric.c and call it from the ZJIT helper, keeping the
   implementation centralized.

The new rb_zjit_flo_to_i wrapper in zjit.c delegates directly to
flo_to_i, so there is no deviation from the Float#to_i semantics.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Address review feedback:
1. Move the helper from jit.c (shared YJIT/ZJIT glue) to zjit.c since
   it is only used by ZJIT.
2. Instead of duplicating the truncation logic, export flo_to_i from
   numeric.c and call it from the ZJIT helper, keeping the
   implementation centralized.

The new rb_zjit_flo_to_i wrapper in zjit.c delegates directly to
flo_to_i, so there is no deviation from the Float#to_i semantics.
</pre>
</div>
</content>
</entry>
<entry>
<title>ZJIT: Inline Float#to_i</title>
<updated>2026-04-15T22:01:02+00:00</updated>
<author>
<name>Chris Hasiński</name>
<email>krzysztof.hasinski@gmail.com</email>
</author>
<published>2026-04-13T10:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4cbb9d145bb102588df907890eb3686217d03c99'/>
<id>4cbb9d145bb102588df907890eb3686217d03c99</id>
<content type='text'>
Add FloatToInt HIR instruction that truncates a Flonum to Integer
via rb_jit_flo_to_i with GC preparation. The helper uses trunc()
for truncation toward zero, then returns Fixnum (LONG2FIX) or
Bignum (rb_dbl2big) depending on magnitude.

rb_jit_flo_to_i is a new JIT helper in jit.c, following the same
pattern as rb_jit_fix_div_fix for wrapping a static C function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add FloatToInt HIR instruction that truncates a Flonum to Integer
via rb_jit_flo_to_i with GC preparation. The helper uses trunc()
for truncation toward zero, then returns Fixnum (LONG2FIX) or
Bignum (rb_dbl2big) depending on magnitude.

rb_jit_flo_to_i is a new JIT helper in jit.c, following the same
pattern as rb_jit_fix_div_fix for wrapping a static C function.
</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>
</feed>
