[前][次][番号順一覧][スレッド一覧]

ruby-changes:65279

From: Peter <ko1@a...>
Date: Wed, 17 Feb 2021 08:08:22 +0900 (JST)
Subject: [ruby-changes:65279] 33b8bd97a8 (master): Remove unreachable if statement in gc_page_sweep

https://git.ruby-lang.org/ruby.git/commit/?id=33b8bd97a8

From 33b8bd97a8e7d894c3e19b7362884c4882bf38e0 Mon Sep 17 00:00:00 2001
From: Peter Zhu <peter@p...>
Date: Tue, 16 Feb 2021 17:27:35 -0500
Subject: Remove unreachable if statement in gc_page_sweep

This if statement is not reachable because `was_compacting` cannot be true when `heap->compact_cursor` is NULL.
---
 gc.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/gc.c b/gc.c
index 30badf9..73157a6 100644
--- a/gc.c
+++ b/gc.c
@@ -4958,13 +4958,6 @@ gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_ https://github.com/ruby/ruby/blob/trunk/gc.c#L4958
                             MARK_IN_BITMAP(GET_HEAP_PINNED_BITS(vp), vp);
                         }
                         else {
-                            /* When we started sweeping this page, we were in
-                             * compacting mode and nulled the free list for
-                             * the page. But compaction finished, so we need to
-                             * put any T_NONE slots back on the freelist. */
-                            if (was_compacting) {
-                                heap_page_add_freeobj(objspace, sweep_page, vp);
-                            }
                             empty_slots++; /* already freed */
                         }
 			break;
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]