mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: reduce the number of variables
in mark_ec_units() to simplify code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
af2e98ae80
commit
c55e10a9ea
1 changed files with 5 additions and 7 deletions
12
mjit.c
12
mjit.c
|
@ -192,22 +192,20 @@ create_unit(const rb_iseq_t *iseq)
|
||||||
static void
|
static void
|
||||||
mark_ec_units(rb_execution_context_t *ec)
|
mark_ec_units(rb_execution_context_t *ec)
|
||||||
{
|
{
|
||||||
const rb_iseq_t *iseq;
|
|
||||||
const rb_control_frame_t *cfp;
|
const rb_control_frame_t *cfp;
|
||||||
rb_control_frame_t *last_cfp = ec->cfp;
|
|
||||||
const rb_control_frame_t *end_marker_cfp;
|
|
||||||
uintptr_t i, size;
|
|
||||||
|
|
||||||
if (ec->vm_stack == NULL)
|
if (ec->vm_stack == NULL)
|
||||||
return;
|
return;
|
||||||
end_marker_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
|
for (cfp = RUBY_VM_END_CONTROL_FRAME(ec) - 1; ; cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp)) {
|
||||||
size = end_marker_cfp - last_cfp;
|
const rb_iseq_t *iseq;
|
||||||
for (i = 0, cfp = end_marker_cfp - 1; i < size; i++, cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp)) {
|
|
||||||
if (cfp->pc && (iseq = cfp->iseq) != NULL
|
if (cfp->pc && (iseq = cfp->iseq) != NULL
|
||||||
&& imemo_type((VALUE) iseq) == imemo_iseq
|
&& imemo_type((VALUE) iseq) == imemo_iseq
|
||||||
&& (iseq->body->jit_unit) != NULL) {
|
&& (iseq->body->jit_unit) != NULL) {
|
||||||
iseq->body->jit_unit->used_code_p = TRUE;
|
iseq->body->jit_unit->used_code_p = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cfp == ec->cfp)
|
||||||
|
break; /* reached the most recent cfp */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue