__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
This commit is contained in:
parent
307547f02f
commit
90cb7d3048
@ -10,8 +10,6 @@ typedef unsigned long lindex_t;
|
|||||||
typedef VALUE GENTRY;
|
typedef VALUE GENTRY;
|
||||||
typedef rb_iseq_t *ISEQ;
|
typedef rb_iseq_t *ISEQ;
|
||||||
|
|
||||||
#define CALL_ATTRIBUTE(name, insn, ...) attr_ ## name ## _ ## insn(__VA_ARGS__)
|
|
||||||
|
|
||||||
% attrs = RubyVM::Instructions.map(&:attributes).flatten
|
% attrs = RubyVM::Instructions.map(&:attributes).flatten
|
||||||
%
|
%
|
||||||
% attrs.each do |a|
|
% attrs.each do |a|
|
||||||
|
@ -35,11 +35,10 @@ insn_stack_increase_dispatch(enum ruby_vminsn_type insn, const VALUE *opes)
|
|||||||
% RubyVM::Instructions.each do |i|
|
% RubyVM::Instructions.each do |i|
|
||||||
% next unless i.has_attribute?('sp_inc')
|
% next unless i.has_attribute?('sp_inc')
|
||||||
case <%= i.bin %>:
|
case <%= i.bin %>:
|
||||||
return CALL_ATTRIBUTE(sp_inc, <%= i.name %><%=
|
return attr_sp_inc_<%= i.name %>(<%=
|
||||||
i.opes.map.with_index do |v, j|
|
i.opes.map.with_index do |v, j|
|
||||||
k = i.cast_from_VALUE v, "opes[#{j}]"
|
i.cast_from_VALUE v, "opes[#{j}]"
|
||||||
next ", #{k}"
|
end.join(", ")
|
||||||
end.join
|
|
||||||
%>);
|
%>);
|
||||||
% end
|
% end
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user