From 1f34da3709673a926483fe056185c41766a637da Mon Sep 17 00:00:00 2001
From: k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 1 Feb 2019 11:52:06 +0000
Subject: 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index c141386c2c..5422bde4b2 100644
--- a/insns.def
+++ b/insns.def
@@ -1421,7 +1421,7 @@ opt_regexpmatch1
 (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);
 }
-- 
cgit v1.2.3

