Skip to content

Commit

Permalink
procnames-start-lines [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 17, 2020
1 parent 352e923 commit a90f29e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions compile.c
Expand Up @@ -596,15 +596,17 @@ APPEND_ELEM(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor, LINK_ELEMENT *before, LI
#define APPEND_ELEM(anchor, before, elem) APPEND_ELEM(iseq, (anchor), (before), (elem))
#endif

static int branch_coverage_valid_p(rb_iseq_t *iseq, int first_line)
static int
branch_coverage_valid_p(rb_iseq_t *iseq, int first_line)
{
if (!ISEQ_COVERAGE(iseq)) return 0;
if (!ISEQ_BRANCH_COVERAGE(iseq)) return 0;
if (first_line <= 0) return 0;
return 1;
}

static VALUE decl_branch_base(rb_iseq_t *iseq, const NODE *node, const char *type)
static VALUE
decl_branch_base(rb_iseq_t *iseq, const NODE *node, const char *type)
{
const int first_lineno = nd_first_lineno(node), first_column = nd_first_column(node);
const int last_lineno = nd_last_lineno(node), last_column = nd_last_column(node);
Expand Down Expand Up @@ -643,7 +645,8 @@ static VALUE decl_branch_base(rb_iseq_t *iseq, const NODE *node, const char *typ
return branches;
}

static void add_trace_branch_coverage(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *node, int branch_id, const char *type, VALUE branches)
static void
add_trace_branch_coverage(rb_iseq_t *iseq, LINK_ANCHOR *const seq, const NODE *node, int branch_id, const char *type, VALUE branches)
{
const int first_lineno = nd_first_lineno(node), first_column = nd_first_column(node);
const int last_lineno = nd_last_lineno(node), last_column = nd_last_column(node);
Expand Down
9 changes: 6 additions & 3 deletions thread.c
Expand Up @@ -3590,7 +3590,8 @@ rb_thread_variables(VALUE thread)
return ary;
}

VALUE rb_thread_scheduler_get(VALUE thread)
VALUE
rb_thread_scheduler_get(VALUE thread)
{
rb_thread_t * th = rb_thread_ptr(thread);

Expand All @@ -3599,7 +3600,8 @@ VALUE rb_thread_scheduler_get(VALUE thread)
return th->scheduler;
}

VALUE rb_thread_scheduler_set(VALUE thread, VALUE scheduler)
VALUE
rb_thread_scheduler_set(VALUE thread, VALUE scheduler)
{
rb_thread_t * th = rb_thread_ptr(thread);

Expand All @@ -3624,7 +3626,8 @@ rb_thread_scheduler(VALUE klass)
return rb_thread_scheduler_if_nonblocking(rb_thread_current());
}

VALUE rb_thread_scheduler_if_nonblocking(VALUE thread)
VALUE
rb_thread_scheduler_if_nonblocking(VALUE thread)
{
rb_thread_t * th = rb_thread_ptr(thread);

Expand Down

0 comments on commit a90f29e

Please sign in to comment.