<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/variable.h, 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>variable.c: refactor accesses to the generic_fields_tbl</title>
<updated>2025-08-06T10:33:44+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-08-05T11:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=92688f7d570c9c37ccb05b80577e1032aae908b7'/>
<id>92688f7d570c9c37ccb05b80577e1032aae908b7</id>
<content type='text'>
All accesses to `generic_fields_tbl_` are now encapsulated inside:

  - `rb_obj_fields`
  - `rb_obj_set_fields`
  - `rb_obj_replace_fields`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All accesses to `generic_fields_tbl_` are now encapsulated inside:

  - `rb_obj_fields`
  - `rb_obj_set_fields`
  - `rb_obj_replace_fields`
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor generic fields to use `T_IMEMO/fields` objects.</title>
<updated>2025-06-17T13:28:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-16T09:19:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cd9f447be247478d2eb3da985295735cce20cb23'/>
<id>cd9f447be247478d2eb3da985295735cce20cb23</id>
<content type='text'>
Followup: https://github.com/ruby/ruby/pull/13589

This simplify a lot of things, as we no longer need to manually
manage the memory, we can use the Read-Copy-Update pattern and
avoid numerous race conditions.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Followup: https://github.com/ruby/ruby/pull/13589

This simplify a lot of things, as we no longer need to manually
manage the memory, we can use the Read-Copy-Update pattern and
avoid numerous race conditions.

Co-Authored-By: Étienne Barrié &lt;etienne.barrie@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of `gen_fields_tbl.fields_count`</title>
<updated>2025-06-09T14:38:29+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-09T08:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f9966b9b76706705202f83112e0e2dea0237aea1'/>
<id>f9966b9b76706705202f83112e0e2dea0237aea1</id>
<content type='text'>
This data is redundant because the shape already contains both the
length and capacity of the object's fields.

So it both waste space and create the possibility of a desync between
the two.

We also do not need to initialize everything to Qundef, this seem
to be a left-over from pre-shape instance variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This data is redundant because the shape already contains both the
length and capacity of the object's fields.

So it both waste space and create the possibility of a desync between
the two.

We also do not need to initialize everything to Qundef, this seem
to be a left-over from pre-shape instance variables.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor `rb_shape_rebuild_shape` to stop exposing `rb_shape_t`</title>
<updated>2025-05-27T10:45:24+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-05-27T07:36:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8b0868cbb106c49d8761536abc408dae0b2e1c1c'/>
<id>8b0868cbb106c49d8761536abc408dae0b2e1c1c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add shape_id to RBasic under 32 bit</title>
<updated>2025-05-26T08:31:54+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-05-14T18:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f483befd9065d159d3a944b87fe26179c5373c30'/>
<id>f483befd9065d159d3a944b87fe26179c5373c30</id>
<content type='text'>
This makes `RBobject` `4B` larger on 32 bit systems
but simplifies the implementation a lot.

[Feature #21353]

Co-authored-by: Jean Boussier &lt;byroot@ruby-lang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes `RBobject` `4B` larger on 32 bit systems
but simplifies the implementation a lot.

[Feature #21353]

Co-authored-by: Jean Boussier &lt;byroot@ruby-lang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `ivptr` -&gt; `fields`,  `next_iv_index` -&gt; `next_field_index`</title>
<updated>2025-05-08T05:58:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-04-30T07:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0ea210d1ea257162642969edce665935cc87c643'/>
<id>0ea210d1ea257162642969edce665935cc87c643</id>
<content type='text'>
Ivars will longer be the only thing stored inline
via shapes, so keeping the `iv_index` and `ivptr` names
would be confusing.

Instance variables won't be the only thing stored inline
via shapes, so keeping the `ivptr` name would be confusing.

`field` encompass anything that can be stored in a VALUE array.

Similarly, `gen_ivtbl` becomes `gen_fields_tbl`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ivars will longer be the only thing stored inline
via shapes, so keeping the `iv_index` and `ivptr` names
would be confusing.

Instance variables won't be the only thing stored inline
via shapes, so keeping the `ivptr` name would be confusing.

`field` encompass anything that can be stored in a VALUE array.

Similarly, `gen_ivtbl` becomes `gen_fields_tbl`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Free everything at shutdown</title>
<updated>2023-12-07T20:52:35+00:00</updated>
<author>
<name>Adam Hess</name>
<email>adamhess1991@gmail.com</email>
</author>
<published>2023-10-12T18:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6816e8efcff3be75f8020cd1b0ea57d3cd664bbc'/>
<id>6816e8efcff3be75f8020cd1b0ea57d3cd664bbc</id>
<content type='text'>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown.

Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;
Co-authored-by: Peter Zhu &lt;peter@peterzhu.ca&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ST table to gen_ivtbl for complex shapes</title>
<updated>2023-10-31T16:07:54+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2023-10-31T13:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e2d950733ee274e577813b5a4e930f617c60634f'/>
<id>e2d950733ee274e577813b5a4e930f617c60634f</id>
<content type='text'>
On 32-bit systems, we must store the shape ID in the gen_ivtbl to not
lose the shape. If we directly store the ST table into the generic
ivar table, then we lose the shape. This makes it impossible to
determine the shape of the object and whether it is too complex or not.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On 32-bit systems, we must store the shape ID in the gen_ivtbl to not
lose the shape. If we directly store the ST table into the generic
ivar table, then we lose the shape. This makes it impossible to
determine the shape of the object and whether it is too complex or not.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove dependancy of vm_core.h on shape.h</title>
<updated>2023-04-06T10:07:16+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-02-17T14:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=879cda98a4cdce91d736ea9ba81168effe090718'/>
<id>879cda98a4cdce91d736ea9ba81168effe090718</id>
<content type='text'>
so that now shape can happily include gc.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
so that now shape can happily include gc.h
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "This commit implements the Object Shapes technique in CRuby.""</title>
<updated>2022-10-11T15:40:56+00:00</updated>
<author>
<name>Jemma Issroff</name>
<email>jemmaissroff@gmail.com</email>
</author>
<published>2022-10-03T15:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad63b668e22e21c352b852f3119ae98a7acf99f1'/>
<id>ad63b668e22e21c352b852f3119ae98a7acf99f1</id>
<content type='text'>
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
</pre>
</div>
</content>
</entry>
</feed>
