diff --git a/ChangeLog b/ChangeLog index 0a175f54e9..2390c2efc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jul 16 18:03:50 2014 Koichi Sasada + + * gc.c (gc_mark_roots): call rb_vm_mark directly. + + * vm.c: remove mark function for RubyVM object because + RubyVM object marked manually. + Wed Jul 16 12:25:39 2014 NARUSE, Yui * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09. diff --git a/gc.c b/gc.c index c7e306c2e3..69e9e72a6d 100644 --- a/gc.c +++ b/gc.c @@ -4222,7 +4222,8 @@ gc_mark_roots(rb_objspace_t *objspace, int full_mark, const char **categoryp) MARK_CHECKPOINT("vm"); SET_STACK_END; - th->vm->self ? rb_gc_mark(th->vm->self) : rb_vm_mark(th->vm); + rb_vm_mark(th->vm); + if (th->vm->self) gc_mark_ptr(objspace, th->vm->self); MARK_CHECKPOINT("finalizers"); mark_tbl(objspace, finalizer_table); diff --git a/vm.c b/vm.c index c33f16a0bd..4e0ea418ce 100644 --- a/vm.c +++ b/vm.c @@ -1790,8 +1790,6 @@ rb_vm_add_root_module(ID id, VALUE module) return TRUE; } -#define vm_free 0 - int ruby_vm_destruct(rb_vm_t *vm) { @@ -1844,7 +1842,7 @@ vm_memsize(const void *ptr) static const rb_data_type_t vm_data_type = { "VM", - {rb_vm_mark, vm_free, vm_memsize,}, + {NULL, NULL, vm_memsize,}, NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY };