ruby-changes:63469
From: Aaron <ko1@a...>
Date: Thu, 29 Oct 2020 08:11:49 +0900 (JST)
Subject: [ruby-changes:63469] d8b0f1f7a8 (master): Objects are born embedded, so we don't need to check ivpr
https://git.ruby-lang.org/ruby.git/commit/?id=d8b0f1f7a8 From d8b0f1f7a84bf1ad85d649b125986ce181e79a58 Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 28 Oct 2020 15:11:06 -0700 Subject: Objects are born embedded, so we don't need to check ivpr It's not necessary to check ivpt because objects are allocated as "embedded" by default diff --git a/gc.c b/gc.c index dd9f091..8d7449a 100644 --- a/gc.c +++ b/gc.c @@ -2734,8 +2734,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L2734 switch (BUILTIN_TYPE(obj)) { case T_OBJECT: - if ((RANY(obj)->as.basic.flags & ROBJECT_EMBED) || - RANY(obj)->as.object.as.heap.ivptr == NULL) { + if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) { RB_DEBUG_COUNTER_INC(obj_obj_embed); } else if (ROBJ_TRANSIENT_P(obj)) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/