ruby-changes:49608
From: nobu <ko1@a...>
Date: Tue, 9 Jan 2018 21:26:28 +0900 (JST)
Subject: [ruby-changes:49608] nobu:r61723 (trunk): insns_info.inc.tmpl: split rb_vm_insn_name_info
nobu 2018-01-09 21:26:23 +0900 (Tue, 09 Jan 2018) New Revision: 61723 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61723 Log: 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. Modified files: trunk/template/insns_info.inc.tmpl Index: template/insns_info.inc.tmpl =================================================================== --- template/insns_info.inc.tmpl (revision 61722) +++ template/insns_info.inc.tmpl (revision 61723) @@ -31,13 +31,26 @@ const unsigned short rb_vm_insn_name_inf https://github.com/ruby/ruby/blob/trunk/template/insns_info.inc.tmpl#L31 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 }; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/