diff options
-rw-r--r-- | compile.c | 27 | ||||
-rw-r--r-- | version.h | 8 |
2 files changed, 30 insertions, 5 deletions
@@ -482,6 +482,7 @@ static TRACE *new_trace_body(rb_iseq_t *iseq, rb_event_flag_t event); 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); @@ -611,6 +612,20 @@ validate_labels(rb_iseq_t *iseq, st_table *labels_table) } VALUE +rb_iseq_compile_ifunc(rb_iseq_t *iseq, const struct vm_ifunc *ifunc) +{ + DECL_ANCHOR(ret); + INIT_ANCHOR(ret); + + (*ifunc->func)(iseq, ret, ifunc->data); + + ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave); + + CHECK(iseq_setup_insn(iseq, ret)); + return iseq_setup(iseq, ret); +} + +VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node) { DECL_ANCHOR(ret); @@ -723,6 +738,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); } @@ -1248,7 +1264,7 @@ iseq_insert_nop_between_end_and_cont(rb_iseq_t *iseq) } 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; @@ -1281,6 +1297,15 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) debugs("[compile step 3.4 (iseq_insert_nop_between_end_and_cont)]\n"); iseq_insert_nop_between_end_and_cont(iseq); + 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) @@ -1,10 +1,10 @@ #define RUBY_VERSION "2.5.6" -#define RUBY_RELEASE_DATE "2019-04-30" -#define RUBY_PATCHLEVEL 165 +#define RUBY_RELEASE_DATE "2019-05-03" +#define RUBY_PATCHLEVEL 166 #define RUBY_RELEASE_YEAR 2019 -#define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 30 +#define RUBY_RELEASE_MONTH 5 +#define RUBY_RELEASE_DAY 3 #include "ruby/version.h" |