зеркало из https://github.com/github/ruby.git
* gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
flag in nested case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d8eb7f3c0d
Коммит
60b7bd2ea3
|
@ -1,3 +1,8 @@
|
|||
Mon Dec 16 18:00:51 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
|
||||
flag in nested case.
|
||||
|
||||
Mon Dec 16 16:40:35 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_method.c (rb_method_entry_make): fix WB miss.
|
||||
|
|
9
gc.c
9
gc.c
|
@ -1748,13 +1748,20 @@ rb_objspace_each_objects(each_obj_callback *callback, void *data)
|
|||
{
|
||||
struct each_obj_args args;
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
int prev_dont_lazy_sweep = objspace->flags.dont_lazy_sweep;
|
||||
|
||||
gc_rest_sweep(objspace);
|
||||
objspace->flags.dont_lazy_sweep = TRUE;
|
||||
|
||||
args.callback = callback;
|
||||
args.data = data;
|
||||
rb_ensure(objspace_each_objects, (VALUE)&args, lazy_sweep_enable, Qnil);
|
||||
|
||||
if (prev_dont_lazy_sweep) {
|
||||
objspace_each_objects((VALUE)&args);
|
||||
}
|
||||
else {
|
||||
rb_ensure(objspace_each_objects, (VALUE)&args, lazy_sweep_enable, Qnil);
|
||||
}
|
||||
}
|
||||
|
||||
struct os_each_struct {
|
||||
|
|
Загрузка…
Ссылка в новой задаче