ruby-changes:55730
From: Aaron <ko1@a...>
Date: Wed, 15 May 2019 17:57:13 +0900 (JST)
Subject: [ruby-changes:55730] Aaron Patterson: 3cf767ee35 (trunk): unpin finalizers and update references
https://git.ruby-lang.org/ruby.git/commit/?id=3cf767ee35 From 3cf767ee35060d7d261f47399a7d717256d0f237 Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Thu, 9 May 2019 14:36:30 -0700 Subject: unpin finalizers and update references diff --git a/gc.c b/gc.c index 228fcfa..b71c501 100644 --- a/gc.c +++ b/gc.c @@ -4461,15 +4461,6 @@ mark_key(st_data_t key, st_data_t value, st_data_t data) https://github.com/ruby/ruby/blob/trunk/gc.c#L4461 return ST_CONTINUE; } -static int -mark_and_pin_value_pin_key(st_data_t key, st_data_t value, st_data_t data) -{ - rb_objspace_t *objspace = (rb_objspace_t *)data; - gc_pin(objspace, (VALUE)key); - gc_mark_and_pin(objspace, (VALUE)value); - return ST_CONTINUE; -} - static void mark_set(rb_objspace_t *objspace, st_table *tbl) { @@ -4481,7 +4472,7 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L4472 mark_finalizer_tbl(rb_objspace_t *objspace, st_table *tbl) { if (!tbl) return; - st_foreach(tbl, mark_and_pin_value_pin_key, (st_data_t)objspace); + st_foreach(tbl, mark_value, (st_data_t)objspace); } void @@ -8100,6 +8091,7 @@ gc_update_references(rb_objspace_t * objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L8091 global_symbols.ids = rb_gc_new_location(global_symbols.ids); global_symbols.dsymbol_fstr_hash = rb_gc_new_location(global_symbols.dsymbol_fstr_hash); gc_update_table_refs(objspace, global_symbols.str_sym); + gc_update_table_refs(objspace, finalizer_table); } static VALUE type_sym(size_t type); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/