summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-11 11:23:16 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-11 11:23:16 (GMT)
commite45fb73d7bc80b0f41b938279884bb4ea03c192e (patch)
treea997bb8edbc52fda7031fd789f61d163efbec2f0 /vm.c
parent8c6c9c46d8aecccfa66e9e34a76e7768025671b1 (diff)
* vm.c (rb_thread_mark): use rb_gc_mark_values() to mark VM stack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index c1d54b1..b65864a 100644
--- a/vm.c
+++ b/vm.c
@@ -1981,10 +1981,8 @@ rb_thread_mark(void *ptr)
rb_control_frame_t *cfp = th->cfp;
rb_control_frame_t *limit_cfp = (void *)(th->stack + th->stack_size);
- while (p < sp) {
- rb_gc_mark(*p++);
- }
- rb_gc_mark_locations(p, p + th->mark_stack_len);
+ rb_gc_mark_values((long)(sp - p), p);
+ rb_gc_mark_locations(sp, sp + th->mark_stack_len);
while (cfp != limit_cfp) {
rb_iseq_t *iseq = cfp->iseq;