summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
authorJean Boussier <[email protected]>2025-04-21 16:16:07 +0900
committerJean Boussier <[email protected]>2025-05-08 07:58:05 +0200
commitf48e45d1e9c4412d5f3ee49241d0b9359651ce7c (patch)
tree88e53f6ef5e926b87f6ab620ca6ff23bf15380f3 /include/ruby
parentd34c15054708c84e9d3305ede0752820b42ac498 (diff)
Move `object_id` in object fields.
And get rid of the `obj_to_id_tbl` It's no longer needed, the `object_id` is now stored inline in the object alongside instance variables. We still need the inverse table in case `_id2ref` is invoked, but we lazily build it by walking the heap if that happens. The `object_id` concern is also no longer a GC implementation concern, but a generic implementation. Co-Authored-By: Matt Valentine-House <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13159
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/internal/fl_type.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h
index f80f65ef8f..0cad5b673d 100644
--- a/include/ruby/internal/fl_type.h
+++ b/include/ruby/internal/fl_type.h
@@ -280,24 +280,12 @@ ruby_fl_type {
= 0,
- /**
- * This flag has something to do with object IDs. Unlike in the old days,
- * an object's object ID (that a user can query using `Object#object_id`)
- * is no longer its physical address represented using Ruby level integers.
- * It is now a monotonic-increasing integer unrelated to the underlying
- * memory arrangement. Object IDs are assigned when necessary; objects are
- * born without one, and will eventually have such property when queried.
- * The interpreter has to manage which one is which. This is the flag that
- * helps the management. Objects with this flag set are the ones with
- * object IDs assigned.
- *
- * @internal
- *
- * But honestly, @shyouhei doesn't think this flag should be visible from
- * 3rd parties. It must be an implementation detail that they should never
- * know. Might better be hidden.
- */
- RUBY_FL_SEEN_OBJ_ID = (1<<9),
+ /**
+ * This flag is no longer in use
+ *
+ * @internal
+ */
+ RUBY_FL_UNUSED9 = (1<<9),
/**
* This flag has something to do with instance variables. 3rd parties need