summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 12:26:23 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 12:26:23 (GMT)
commitd68a3d3bc11c06edbfca6e02839acc1f6cbe0685 (patch)
tree718a87b0cc44dd9e018cb0bf9cb4f5043b0d2677 /template
parent0b3dfa087bbe192aa43f3d3d84f214c1fdb0d814 (diff)
insns_info.inc.tmpl: split rb_vm_insn_name_info
* template/insns_info.inc.tmpl (rb_vm_insn_name_info): split instruction names pool not to exceed C90 limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/insns_info.inc.tmpl19
1 files changed, 16 insertions, 3 deletions
diff --git a/template/insns_info.inc.tmpl b/template/insns_info.inc.tmpl
index c4bbf0f..546368d 100644
--- a/template/insns_info.inc.tmpl
+++ b/template/insns_info.inc.tmpl
@@ -31,13 +31,26 @@ const unsigned short rb_vm_insn_name_info_offset[] = {
ASSERT_VM_INSTRUCTION_SIZE(rb_vm_insn_name_info_offset);
+% n = 100
const struct rb_vm_insn_name_info {
% @insns.each_with_index do |insn, i|
- char L<%=i%>[<%= insn.name.size+1 %>];
+% if (i % n) == 0
+ struct {
+% end
+ char L<%=i%n%>[<%= insn.name.size+1 %>];
+% if (i % n) == n - 1 or i == @insns.size - 1
+ } S<%=i / n%>;
+% end
% end
} rb_vm_insn_name_info_base = {
-% @insns.each do |insn|
- "<%= insn.name %>",
+% @insns.each_with_index do |insn, i|
+% if (i % n) == 0
+ {
+% end
+ "<%= insn.name %>",
+% if (i % n) == n - 1 or i == @insns.size - 1
+ },
+% end
% end
};