diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-13 10:47:33 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-13 10:47:33 +0000 |
commit | 90cb7d30487ddc6e9e3b70ea60bd9ad624d8e716 (patch) | |
tree | d9a05f58125d64f8e655a4ef8b58f65b21240141 /tool/ruby_vm | |
parent | 307547f02fa4523a8dea67bf9b617629af91a6c0 (diff) | |
download | ruby-90cb7d30487ddc6e9e3b70ea60bd9ad624d8e716.tar.gz |
__VA_ARGS__ is a C99ism
give up CALL_ATTRIBUTE macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r-- | tool/ruby_vm/views/_attributes.erb | 2 | ||||
-rw-r--r-- | tool/ruby_vm/views/_insn_stack_increase.erb | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tool/ruby_vm/views/_attributes.erb b/tool/ruby_vm/views/_attributes.erb index 258bf02906..d15299c235 100644 --- a/tool/ruby_vm/views/_attributes.erb +++ b/tool/ruby_vm/views/_attributes.erb @@ -10,8 +10,6 @@ typedef unsigned long lindex_t; typedef VALUE GENTRY; typedef rb_iseq_t *ISEQ; -#define CALL_ATTRIBUTE(name, insn, ...) attr_ ## name ## _ ## insn(__VA_ARGS__) - % attrs = RubyVM::Instructions.map(&:attributes).flatten % % attrs.each do |a| diff --git a/tool/ruby_vm/views/_insn_stack_increase.erb b/tool/ruby_vm/views/_insn_stack_increase.erb index bfe0a3dc6b..84f5dbc935 100644 --- a/tool/ruby_vm/views/_insn_stack_increase.erb +++ b/tool/ruby_vm/views/_insn_stack_increase.erb @@ -35,11 +35,10 @@ insn_stack_increase_dispatch(enum ruby_vminsn_type insn, const VALUE *opes) % RubyVM::Instructions.each do |i| % next unless i.has_attribute?('sp_inc') case <%= i.bin %>: - return CALL_ATTRIBUTE(sp_inc, <%= i.name %><%= + return attr_sp_inc_<%= i.name %>(<%= i.opes.map.with_index do |v, j| - k = i.cast_from_VALUE v, "opes[#{j}]" - next ", #{k}" - end.join + i.cast_from_VALUE v, "opes[#{j}]" + end.join(", ") %>); % end } |