New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for current version #14

Merged
merged 25 commits into from Oct 8, 2011
Commits
Jump to file or symbol
Failed to load files and symbols.
+2 −22
Diff settings

Always

Just for now

Viewing a subset of changes. View all

use rb_iseq_line_no().

  • Loading branch information...
nobu committed Sep 15, 2011
commit f4b590a22e304100ea29f27d1bbde2ff22984049
@@ -749,28 +749,8 @@ set_thread_event_flag_i(st_data_t key, st_data_t val, st_data_t flag)
static int
find_prev_line_start(rb_control_frame_t *cfp)
{
int i, pos, line_no;
pos = cfp->pc - cfp->iseq->iseq_encoded;
for (i = 0; i < cfp->iseq->insn_info_size; i++)
{
if (cfp->iseq->insn_info_table[i].position != pos)
continue;
if (i == 0) return(0); // TODO
pos = -1;
line_no = cfp->iseq->insn_info_table[--i].line_no;
do {
if (cfp->iseq->insn_info_table[i].line_no == line_no)
pos = cfp->iseq->insn_info_table[i].position;
else
break;
i--;
} while (i >= 0);
return(pos);
}
return(-1);
const rb_iseq_t *iseq = cfp->iseq;
return rb_iseq_line_no(iseq, cfp->pc - iseq->iseq_encoded - 1);
}
static rb_control_frame_t *
ProTip! Use n and p to navigate between commits in a pull request.