summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-27 12:17:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-27 12:17:56 +0000
commit083a25f9031401803f91156ba7687a53312c7e75 (patch)
tree3f01f784c5b40a1cd8fed23a74eeacea34ddcc81 /vm.c
parent9e9f57e4a0e6cb87a983d14230e1822f0f8bec13 (diff)
vm_core.h: shrink trap_list size
* vm_core.h (rb_vm_struct): separate trap_list cmd and safe to each arrays, to shrink the size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index 814f8b6780..6815e84f76 100644
--- a/vm.c
+++ b/vm.c
@@ -2115,8 +2115,6 @@ void rb_vm_trace_mark_event_hooks(rb_hook_list_t *hooks);
void
rb_vm_mark(void *ptr)
{
- int i;
-
RUBY_MARK_ENTER("vm");
RUBY_GC_INFO("-------------------------------------------------\n");
if (ptr) {
@@ -2144,10 +2142,7 @@ rb_vm_mark(void *ptr)
rb_vm_trace_mark_event_hooks(&vm->event_hooks);
- for (i = 0; i < RUBY_NSIG; i++) {
- if (vm->trap_list[i].cmd)
- rb_gc_mark(vm->trap_list[i].cmd);
- }
+ rb_gc_mark_values(RUBY_NSIG, vm->trap_list.cmd);
}
RUBY_MARK_LEAVE("vm");