summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-09 23:08:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-09 23:08:01 +0000
commit324b6d306d7da4fd3fc109e4e9781c782b64369f (patch)
treeeca108813add390a09d49f8c2214fc1711f6f895 /template
parent6820727a907d047b4c8ae989c69ad8397661ef75 (diff)
downloadbundler-324b6d306d7da4fd3fc109e4e9781c782b64369f.tar.gz
iseq.c: operand lvar
* iseq.c (rb_insn_operand_intern): show local variable operand name in unified instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/optinsn.inc.tmpl24
1 files changed, 24 insertions, 0 deletions
diff --git a/template/optinsn.inc.tmpl b/template/optinsn.inc.tmpl
index 186ec46982..b1fba6dea3 100644
--- a/template/optinsn.inc.tmpl
+++ b/template/optinsn.inc.tmpl
@@ -52,3 +52,27 @@ insn_operands_unification(INSN *insnobj)
return insnobj;
}
+int
+rb_insn_unified_local_var_level(VALUE insn)
+{
+#ifdef OPT_OPERANDS_UNIFICATION
+ /* optimize rule */
+ switch (insn) {
+% opt_insns_map.each do |originsn, optinsns|
+% optinsns.each {|opti|
+ case BIN(<%=opti.name%>):
+% opti.defopes.each {|opinfo|
+% next if opinfo[1] == '*'
+ return <%=opinfo[1]%>;
+% break
+% }
+% }
+% end
+
+ default:
+ /* do nothing */;
+ break;
+ }
+#endif
+ return -1;
+}