Remove redundant if statement in try_move
The if statement is redundant since if `index == 0` then `BITS_BITLENGTH * index == 0`.
This commit is contained in:
parent
e3b5cc8836
commit
b07879e553
Notes:
git
2022-01-25 23:38:45 +09:00
7
gc.c
7
gc.c
@ -4959,12 +4959,7 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page,
|
||||
bits >>= NUM_IN_PAGE(p) % BITS_BITLENGTH;
|
||||
if (try_move_plane(objspace, heap, sweep_page, (uintptr_t)p, bits, dest)) return 1;
|
||||
|
||||
if (index == 0) {
|
||||
p = cursor->start + (BITS_BITLENGTH - NUM_IN_PAGE(cursor->start));
|
||||
}
|
||||
else {
|
||||
p = cursor->start + (BITS_BITLENGTH - NUM_IN_PAGE(cursor->start)) + (BITS_BITLENGTH * index);
|
||||
}
|
||||
p = cursor->start + (BITS_BITLENGTH - NUM_IN_PAGE(cursor->start)) + (BITS_BITLENGTH * index);
|
||||
|
||||
/* Find an object to move and move it. Movable objects must be
|
||||
* marked, so we iterate using the marking bitmap */
|
||||
|
Loading…
x
Reference in New Issue
Block a user