<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/objspace/objspace_dump.c, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>ObjectSpace.{dump,dump_all,dump_shapes} needs vm barrier. (#15569)</title>
<updated>2025-12-17T17:17:30+00:00</updated>
<author>
<name>Luke Gruber</name>
<email>luke.gruber@shopify.com</email>
</author>
<published>2025-12-17T17:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=56b67f1684bf1955cf69fc06701e2a710898bd9b'/>
<id>56b67f1684bf1955cf69fc06701e2a710898bd9b</id>
<content type='text'>
This allows these methods to be called from ractors.

Add new exported function `rb_vm_lock_with_barrier()` that requires
users to include "vm_sync.h"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows these methods to be called from ractors.

Add new exported function `rb_vm_lock_with_barrier()` that requires
users to include "vm_sync.h"</pre>
</div>
</content>
</entry>
<entry>
<title>Replace ROBJECT_EMBED by ROBJECT_HEAP</title>
<updated>2025-08-27T10:41:07+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-08-26T15:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5257e1298c4dc4e854eaa0a9fe5e6dc5c1495c91'/>
<id>5257e1298c4dc4e854eaa0a9fe5e6dc5c1495c91</id>
<content type='text'>
The embed layout is way more common than the heap one,
especially since WVA.

I think it makes for more readable code to inverse the
flag.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The embed layout is way more common than the heap one,
especially since WVA.

I think it makes for more readable code to inverse the
flag.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure ObjectSpace.dump won't call cc_cme on invalidated CC</title>
<updated>2025-08-06T22:57:13+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2025-08-06T20:44:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=640a2f1dc77c0ecf226dbd71cf7a1eb876a1f037'/>
<id>640a2f1dc77c0ecf226dbd71cf7a1eb876a1f037</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of RSHAPE_PARENT in favor of RSHAPE_DIRECT_CHILD_P</title>
<updated>2025-07-31T19:55:51+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-07-31T12:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f0c31c5e6492cfc088b8b87a9b86aeb75b22733d'/>
<id>f0c31c5e6492cfc088b8b87a9b86aeb75b22733d</id>
<content type='text'>
`RSHAPE_PARENT` is error prone because it returns a raw untagged
shape_id.

To check if a shape is a direct parent of another, tags should be
discarded. So providing a comparison function is better than exposing
untagged ids.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`RSHAPE_PARENT` is error prone because it returns a raw untagged
shape_id.

To check if a shape is a direct parent of another, tags should be
discarded. So providing a comparison function is better than exposing
untagged ids.
</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>Refactor the last references to `rb_shape_t`</title>
<updated>2025-06-11T14:38:38+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-11T12:32:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=95201299fd7bf0918dfbd8c127ce2b5b33ffa537'/>
<id>95201299fd7bf0918dfbd8c127ce2b5b33ffa537</id>
<content type='text'>
The type isn't opaque because Ruby isn't often compiled with LTO,
so for optimization purpose it's better to allow as much inlining
as possible.

However ideally only `shape.c` and `shape.h` should deal with
the actual struct, and everything else should just deal with opaque
`shape_id_t`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The type isn't opaque because Ruby isn't often compiled with LTO,
so for optimization purpose it's better to allow as much inlining
as possible.

However ideally only `shape.c` and `shape.h` should deal with
the actual struct, and everything else should just deal with opaque
`shape_id_t`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of SHAPE_T_OBJECT</title>
<updated>2025-06-07T16:30:44+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-07T12:44:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6eb0cd8df703d0a2edf7b11eab3255295e58c888'/>
<id>6eb0cd8df703d0a2edf7b11eab3255295e58c888</id>
<content type='text'>
Now that we have the `heap_index` in shape flags we no longer
need `T_OBJECT` shapes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have the `heap_index` in shape flags we no longer
need `T_OBJECT` shapes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of TOO_COMPLEX shape type</title>
<updated>2025-06-04T11:13:50+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-06-04T07:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=675f33508cc08cbd17ff8dc1b14bbbe256a709ba'/>
<id>675f33508cc08cbd17ff8dc1b14bbbe256a709ba</id>
<content type='text'>
Instead it's now a `shape_id` flag.

This allows to check if an object is complex without having
to chase the `rb_shape_t` pointer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead it's now a `shape_id` flag.

This allows to check if an object is complex without having
to chase the `rb_shape_t` pointer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of frozen shapes.</title>
<updated>2025-06-04T05:59:20+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-05-27T13:53:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=625d6a9cbb0ed617b28115e4e3cb063e52481635'/>
<id>625d6a9cbb0ed617b28115e4e3cb063e52481635</id>
<content type='text'>
Instead `shape_id_t` higher bits contain flags, and the first one
tells whether the shape is frozen.

This has multiple benefits:
  - Can check if a shape is frozen with a single bit check instead of
    dereferencing a pointer.
  - Guarantees it is always possible to transition to frozen.
  - This allow reclaiming `FL_FREEZE` (not done yet).

The downside is you have to be careful to preserve these flags
when transitioning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead `shape_id_t` higher bits contain flags, and the first one
tells whether the shape is frozen.

This has multiple benefits:
  - Can check if a shape is frozen with a single bit check instead of
    dereferencing a pointer.
  - Guarantees it is always possible to transition to frozen.
  - This allow reclaiming `FL_FREEZE` (not done yet).

The downside is you have to be careful to preserve these flags
when transitioning.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of `rb_shape_id(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-27T09:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e535f8248b1ad9f18cfc8134dd7e8056d97a6244'/>
<id>e535f8248b1ad9f18cfc8134dd7e8056d97a6244</id>
<content type='text'>
We should avoid conversions from `rb_shape_t *` into `shape_id_t`
outside of `shape.c` as the short term goal is to have `shape_id_t`
contain tags.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should avoid conversions from `rb_shape_t *` into `shape_id_t`
outside of `shape.c` as the short term goal is to have `shape_id_t`
contain tags.
</pre>
</div>
</content>
</entry>
</feed>
