Skip to content

Commit 36c64b3

Browse files
committed
Also prefer FL_TEST_RAW in gc.c
Similar to 4a040ee, I noticed the test for FL_FINALIZE checking FL_ABLE in a profile, and we shouldn't need to do that here.
1 parent 23000c7 commit 36c64b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gc.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1216,14 +1216,14 @@ rb_data_free(void *objspace, VALUE obj)
12161216
void
12171217
rb_gc_obj_free_vm_weak_references(VALUE obj)
12181218
{
1219-
if (FL_TEST(obj, FL_EXIVAR)) {
1219+
if (FL_TEST_RAW(obj, FL_EXIVAR)) {
12201220
rb_free_generic_ivar((VALUE)obj);
12211221
FL_UNSET(obj, FL_EXIVAR);
12221222
}
12231223

12241224
switch (BUILTIN_TYPE(obj)) {
12251225
case T_STRING:
1226-
if (FL_TEST(obj, RSTRING_FSTR)) {
1226+
if (FL_TEST_RAW(obj, RSTRING_FSTR)) {
12271227
rb_gc_free_fstring(obj);
12281228
}
12291229
break;
@@ -1458,7 +1458,7 @@ rb_gc_obj_free(void *objspace, VALUE obj)
14581458
BUILTIN_TYPE(obj), (void*)obj, RBASIC(obj)->flags);
14591459
}
14601460

1461-
if (FL_TEST(obj, FL_FINALIZE)) {
1461+
if (FL_TEST_RAW(obj, FL_FINALIZE)) {
14621462
rb_gc_impl_make_zombie(objspace, obj, 0, 0);
14631463
return FALSE;
14641464
}
@@ -2665,7 +2665,7 @@ rb_gc_mark_roots(void *objspace, const char **categoryp)
26652665
void
26662666
rb_gc_mark_children(void *objspace, VALUE obj)
26672667
{
2668-
if (FL_TEST(obj, FL_EXIVAR)) {
2668+
if (FL_TEST_RAW(obj, FL_EXIVAR)) {
26692669
rb_mark_generic_ivar(obj);
26702670
}
26712671

@@ -2700,7 +2700,7 @@ rb_gc_mark_children(void *objspace, VALUE obj)
27002700

27012701
switch (BUILTIN_TYPE(obj)) {
27022702
case T_CLASS:
2703-
if (FL_TEST(obj, FL_SINGLETON)) {
2703+
if (FL_TEST_RAW(obj, FL_SINGLETON)) {
27042704
gc_mark_internal(RCLASS_ATTACHED_OBJECT(obj));
27052705
}
27062706
// Continue to the shared T_CLASS/T_MODULE
@@ -3635,7 +3635,7 @@ rb_gc_update_object_references(void *objspace, VALUE obj)
36353635
{
36363636
switch (BUILTIN_TYPE(obj)) {
36373637
case T_CLASS:
3638-
if (FL_TEST(obj, FL_SINGLETON)) {
3638+
if (FL_TEST_RAW(obj, FL_SINGLETON)) {
36393639
UPDATE_IF_MOVED(objspace, RCLASS_ATTACHED_OBJECT(obj));
36403640
}
36413641
// Continue to the shared T_CLASS/T_MODULE

0 commit comments

Comments
 (0)