ruby-changes:54765
From: k0kubun <ko1@a...>
Date: Fri, 1 Feb 2019 20:52:13 +0900 (JST)
Subject: [ruby-changes:54765] k0kubun:r66982 (trunk): insns.def: opt_regexpmatch1 is not a leaf insn
k0kubun 2019-02-01 20:52:06 +0900 (Fri, 01 Feb 2019) New Revision: 66982 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66982 Log: insns.def: opt_regexpmatch1 is not a leaf insn Given `str`, if `str_coderange(str)` is `ENC_CODERANGE_BROKEN`, it calls `rb_raise`. And it calls `rb_funcallv` from `rb_exc_new3`. http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1673244 Maybe we can have a function to directly call `exc_initialize` for this purpose, but it may not be worth having such a function for keeping the instruction leaf. We may even want to delete the insn https://github.com/ruby/ruby/pull/1959. I'm not sure whether compile.c could generate opt_regexpmatch2 for invalid coderange string. Let's monitor that for a while. Modified files: trunk/insns.def Index: insns.def =================================================================== --- insns.def (revision 66981) +++ insns.def (revision 66982) @@ -1421,7 +1421,7 @@ opt_regexpmatch1 https://github.com/ruby/ruby/blob/trunk/insns.def#L1421 (VALUE recv) (VALUE obj) (VALUE val) -// attr bool leaf = BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG); +// attr bool leaf = false; /* rb_reg_prepare_enc() may rb_raise() that calls rb_funcallv() */ { val = vm_opt_regexpmatch1(recv, obj); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/