зеркало из https://github.com/github/ruby.git
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:
Родитель
af2e98ae80
Коммит
c55e10a9ea
12
mjit.c
12
mjit.c
|
@ -192,22 +192,20 @@ create_unit(const rb_iseq_t *iseq)
|
|||
static void
|
||||
mark_ec_units(rb_execution_context_t *ec)
|
||||
{
|
||||
const rb_iseq_t *iseq;
|
||||
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)
|
||||
return;
|
||||
end_marker_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
|
||||
size = end_marker_cfp - last_cfp;
|
||||
for (i = 0, cfp = end_marker_cfp - 1; i < size; i++, cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp)) {
|
||||
for (cfp = RUBY_VM_END_CONTROL_FRAME(ec) - 1; ; cfp = RUBY_VM_NEXT_CONTROL_FRAME(cfp)) {
|
||||
const rb_iseq_t *iseq;
|
||||
if (cfp->pc && (iseq = cfp->iseq) != NULL
|
||||
&& imemo_type((VALUE) iseq) == imemo_iseq
|
||||
&& (iseq->body->jit_unit) != NULL) {
|
||||
iseq->body->jit_unit->used_code_p = TRUE;
|
||||
}
|
||||
|
||||
if (cfp == ec->cfp)
|
||||
break; /* reached the most recent cfp */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче