cont.c: avoid needless branch for dmark callbacks
gc.c (gc_mark_children, case T_DATA) does not use the dmark function pointer if DATA_PTR is NULL * cont.c (cont_mark, fiber_mark): remove branch, ptr is never NULL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba77cb7c23
commit
d6de5804ea
10
cont.c
10
cont.c
@ -170,9 +170,9 @@ NOINLINE(static VALUE cont_capture(volatile int *volatile stat));
|
||||
static void
|
||||
cont_mark(void *ptr)
|
||||
{
|
||||
RUBY_MARK_ENTER("cont");
|
||||
if (ptr) {
|
||||
rb_context_t *cont = ptr;
|
||||
|
||||
RUBY_MARK_ENTER("cont");
|
||||
rb_gc_mark(cont->value);
|
||||
|
||||
rb_thread_mark(&cont->saved_thread);
|
||||
@ -211,7 +211,7 @@ cont_mark(void *ptr)
|
||||
cont->machine.register_stack + cont->machine.register_stack_size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RUBY_MARK_LEAVE("cont");
|
||||
}
|
||||
|
||||
@ -307,12 +307,10 @@ rb_fiber_mark_self(rb_fiber_t *fib)
|
||||
static void
|
||||
fiber_mark(void *ptr)
|
||||
{
|
||||
RUBY_MARK_ENTER("cont");
|
||||
if (ptr) {
|
||||
rb_fiber_t *fib = ptr;
|
||||
RUBY_MARK_ENTER("cont");
|
||||
rb_fiber_mark_self(fib->prev);
|
||||
cont_mark(&fib->cont);
|
||||
}
|
||||
RUBY_MARK_LEAVE("cont");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user