mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6c9a705032
commit
b5425ad780
5 changed files with 16 additions and 16 deletions
|
@ -2018,7 +2018,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
|||
/* update sp */
|
||||
sp = calc_sp_depth(sp, iobj);
|
||||
insn_num++;
|
||||
if (ISEQ_COVERAGE(iseq)) {
|
||||
if (ISEQ_COVERAGE(iseq)) {
|
||||
if (ISEQ_LINE_COVERAGE(iseq) && (events & RUBY_EVENT_COVERAGE_LINE) &&
|
||||
!(rb_get_coverage_mode() & COVERAGE_TARGET_ONESHOT_LINES)) {
|
||||
int line = iobj->insn_info.line_no;
|
||||
|
@ -2031,7 +2031,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
|||
RARRAY_ASET(ISEQ_PC2BRANCHINDEX(iseq), code_index, INT2FIX(data));
|
||||
}
|
||||
}
|
||||
code_index += insn_data_length(iobj);
|
||||
code_index += insn_data_length(iobj);
|
||||
iobj->insn_info.events |= events;
|
||||
events = 0;
|
||||
data = 0;
|
||||
|
|
10
iseq.c
10
iseq.c
|
@ -214,7 +214,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
|
|||
}
|
||||
|
||||
rb_gc_mark(body->variable.coverage);
|
||||
rb_gc_mark(body->variable.pc2branchindex);
|
||||
rb_gc_mark(body->variable.pc2branchindex);
|
||||
rb_gc_mark(body->location.label);
|
||||
rb_gc_mark(body->location.base_label);
|
||||
rb_gc_mark(body->location.pathobj);
|
||||
|
@ -1925,7 +1925,7 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos,
|
|||
{
|
||||
rb_event_flag_t events = rb_iseq_event_flags(iseq, pos);
|
||||
if (events) {
|
||||
str = rb_str_catf(str, "[%s%s%s%s%s%s%s%s%s%s%s]",
|
||||
str = rb_str_catf(str, "[%s%s%s%s%s%s%s%s%s%s%s]",
|
||||
events & RUBY_EVENT_LINE ? "Li" : "",
|
||||
events & RUBY_EVENT_CLASS ? "Cl" : "",
|
||||
events & RUBY_EVENT_END ? "En" : "",
|
||||
|
@ -1934,9 +1934,9 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos,
|
|||
events & RUBY_EVENT_C_CALL ? "Cc" : "",
|
||||
events & RUBY_EVENT_C_RETURN ? "Cr" : "",
|
||||
events & RUBY_EVENT_B_CALL ? "Bc" : "",
|
||||
events & RUBY_EVENT_B_RETURN ? "Br" : "",
|
||||
events & RUBY_EVENT_COVERAGE_LINE ? "Cli" : "",
|
||||
events & RUBY_EVENT_COVERAGE_BRANCH ? "Cbr" : ""
|
||||
events & RUBY_EVENT_B_RETURN ? "Br" : "",
|
||||
events & RUBY_EVENT_COVERAGE_LINE ? "Cli" : "",
|
||||
events & RUBY_EVENT_COVERAGE_BRANCH ? "Cbr" : ""
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
4
iseq.h
4
iseq.h
|
@ -75,8 +75,8 @@ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
|
|||
RUBY_EVENT_RETURN| \
|
||||
RUBY_EVENT_B_CALL| \
|
||||
RUBY_EVENT_B_RETURN| \
|
||||
RUBY_EVENT_COVERAGE_LINE| \
|
||||
RUBY_EVENT_COVERAGE_BRANCH)
|
||||
RUBY_EVENT_COVERAGE_LINE| \
|
||||
RUBY_EVENT_COVERAGE_BRANCH)
|
||||
|
||||
#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
|
||||
#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
|
||||
|
|
|
@ -449,7 +449,7 @@ struct rb_iseq_constant_body {
|
|||
struct {
|
||||
rb_snum_t flip_count;
|
||||
VALUE coverage;
|
||||
VALUE pc2branchindex;
|
||||
VALUE pc2branchindex;
|
||||
VALUE *original_iseq;
|
||||
} variable;
|
||||
|
||||
|
|
|
@ -3895,12 +3895,12 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *p
|
|||
EXEC_EVENT_HOOK(ec, RUBY_EVENT_COVERAGE_LINE, GET_SELF(), 0, 0, 0, Qundef);
|
||||
reg_cfp->pc--;
|
||||
}
|
||||
if (events & RUBY_EVENT_COVERAGE_BRANCH) {
|
||||
reg_cfp->pc++;
|
||||
vm_dtrace(RUBY_EVENT_COVERAGE_BRANCH, ec);
|
||||
EXEC_EVENT_HOOK(ec, RUBY_EVENT_COVERAGE_BRANCH, GET_SELF(), 0, 0, 0, Qundef);
|
||||
reg_cfp->pc--;
|
||||
}
|
||||
if (events & RUBY_EVENT_COVERAGE_BRANCH) {
|
||||
reg_cfp->pc++;
|
||||
vm_dtrace(RUBY_EVENT_COVERAGE_BRANCH, ec);
|
||||
EXEC_EVENT_HOOK(ec, RUBY_EVENT_COVERAGE_BRANCH, GET_SELF(), 0, 0, 0, Qundef);
|
||||
reg_cfp->pc--;
|
||||
}
|
||||
if ((event = (events & (RUBY_EVENT_END | RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN))) != 0) {
|
||||
VM_ASSERT(event == RUBY_EVENT_END ||
|
||||
event == RUBY_EVENT_RETURN ||
|
||||
|
|
Loading…
Add table
Reference in a new issue