Skip to content

Commit

Permalink
* gc.c (gc_mark_children): use gc_mark_ptr instead of marking
Browse files Browse the repository at this point in the history
  a object directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
authorNari committed Aug 4, 2012
1 parent cd060b4 commit d7a3331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Sat Aug 4 20:37:56 2012 Narihiro Nakamura <[email protected]>

* gc.c (gc_mark_children): use gc_mark_ptr instead of marking
a object directly.

Sat Aug 4 10:02:03 2012 Shugo Maeda <[email protected]>

* test/ruby/test_alias.rb (test_super_in_aliased_module_method):
Expand Down
6 changes: 1 addition & 5 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,18 +1839,14 @@ static void
gc_mark_children(rb_objspace_t *objspace, VALUE ptr, int lev)
{
register RVALUE *obj = RANY(ptr);
register uintptr_t *bits;

goto marking; /* skip */

again:
obj = RANY(ptr);
if (rb_special_const_p(ptr)) return; /* special const not marked */
if (obj->as.basic.flags == 0) return; /* free cell */
bits = GET_HEAP_BITMAP(ptr);
if (MARKED_IN_BITMAP(bits, ptr)) return; /* already marked */
MARK_IN_BITMAP(bits, ptr);
objspace->heap.live_num++;
if (!gc_mark_ptr(objspace, ptr)) return; /* already marked */

marking:
if (FL_TEST(obj, FL_EXIVAR)) {
Expand Down

0 comments on commit d7a3331

Please sign in to comment.