mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Remove redundant check in rgengc_check_relation
WB-unprotected objects are always young. This invariant is maintained throughout the code base. When WB-unprotecting an object, the object gets de-aged.
This commit is contained in:
1 parent
bac5fe3735
commit
a320eeff00
1 file changed
+1
-1
Notes:
git
2026-10-01 21:59:54 +00:00
@@ -6234,7 +6234,7 @@ static void
|
||||
rgengc_check_relation(rb_objspace_t *objspace, VALUE obj)
|
||||
{
|
||||
if (objspace->rgengc.parent_object_old_p) {
|
||||
if (RVALUE_WB_UNPROTECTED(objspace, obj) || !RVALUE_OLD_P(objspace, obj)) {
|
||||
if (!RVALUE_OLD_P(objspace, obj)) {
|
||||
rgengc_remember(objspace, objspace->rgengc.parent_object);
|
||||
/* It is in the rememberset now, so its remaining children have nothing left
|
||||
* to ask for: stop testing them. */
|
||||
|
||||
Reference in new issue
Block a user