ruby-changes:55647
From: usa <ko1@a...>
Date: Fri, 3 May 2019 06:17:05 +0900 (JST)
Subject: [ruby-changes:55647] usa:6610b77ea8 (ruby_2_5): merge revision(s) 66324: [Backport #15385]
https://git.ruby-lang.org/ruby.git/commit/?id=6610b77ea8 From 6610b77ea85302e33d8cb0a2a082f8bd2b3e2f40 Mon Sep 17 00:00:00 2001 From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Thu, 2 May 2019 21:16:27 +0000 Subject: merge revision(s) 66324: [Backport #15385] Modify insn list only when compiling git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/compile.c b/compile.c index 417ee21..f4f371d 100644 --- a/compile.c +++ b/compile.c @@ -482,6 +482,7 @@ static TRACE *new_trace_body(rb_iseq_t *iseq, rb_event_flag_t event); https://github.com/ruby/ruby/blob/trunk/compile.c#L482 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) https://github.com/ruby/ruby/blob/trunk/compile.c#L612 } 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) https://github.com/ruby/ruby/blob/trunk/compile.c#L738 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) https://github.com/ruby/ruby/blob/trunk/compile.c#L1264 } 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) https://github.com/ruby/ruby/blob/trunk/compile.c#L1297 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) diff --git a/version.h b/version.h index d59d699..f6fa5d4 100644 --- a/version.h +++ b/version.h @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #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" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/