зеркало из https://github.com/github/ruby.git
Modify insn list only when compiling
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
91533d9ab1
Коммит
28eb147484
14
compile.c
14
compile.c
|
@ -487,6 +487,7 @@ static TRACE *new_trace_body(rb_iseq_t *iseq, rb_event_flag_t event, long data);
|
|||
|
||||
static int iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *anchor, const NODE *n, int);
|
||||
static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
|
||||
static int iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
|
||||
static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
|
||||
static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
|
||||
|
||||
|
@ -618,6 +619,7 @@ rb_iseq_compile_ifunc(rb_iseq_t *iseq, const struct vm_ifunc *ifunc)
|
|||
|
||||
ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave);
|
||||
|
||||
CHECK(iseq_setup_insn(iseq, ret));
|
||||
return iseq_setup(iseq, ret);
|
||||
}
|
||||
|
||||
|
@ -732,6 +734,7 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
|
|||
validate_labels(iseq, labels_table);
|
||||
}
|
||||
#endif
|
||||
CHECK(iseq_setup_insn(iseq, ret));
|
||||
return iseq_setup(iseq, ret);
|
||||
}
|
||||
|
||||
|
@ -1296,7 +1299,7 @@ update_catch_except_flags(struct rb_iseq_constant_body *body)
|
|||
}
|
||||
|
||||
static int
|
||||
iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
||||
iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
||||
{
|
||||
if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
|
||||
return COMPILE_NG;
|
||||
|
@ -1326,6 +1329,15 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
|||
dump_disasm_list(FIRST_ELEMENT(anchor));
|
||||
}
|
||||
|
||||
return COMPILE_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
||||
{
|
||||
if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
|
||||
return COMPILE_NG;
|
||||
|
||||
debugs("[compile step 4.1 (iseq_set_sequence)]\n");
|
||||
if (!iseq_set_sequence(iseq, anchor)) return COMPILE_NG;
|
||||
if (compile_debug > 5)
|
||||
|
|
Загрузка…
Ссылка в новой задаче