m4: optimize.

* data/bison.m4, data/java.m4, data/variant.hh: m4_map_args is reported
to be faster than m4_map.
This commit is contained in:
Akim Demaille
2012-07-22 12:00:44 +02:00
parent 485b319598
commit 52ca964032
3 changed files with 5 additions and 5 deletions

View File

@@ -463,7 +463,7 @@ m4_define([b4_token_format],
# Skip NUMS that have no type-name. # Skip NUMS that have no type-name.
m4_define([b4_type_action_], m4_define([b4_type_action_],
[b4_symbol_if([$1], [has_type], [b4_symbol_if([$1], [has_type],
[m4_map([b4_symbol_case_], [$@])[]dnl [m4_map_args([b4_symbol_case_], $@)[]dnl
b4_dollar_dollar([b4_symbol([$1], [number])], b4_dollar_dollar([b4_symbol([$1], [number])],
[b4_symbol([$1], [tag])], [b4_symbol([$1], [tag])],
[b4_symbol([$1], [type])]); [b4_symbol([$1], [type])]);

View File

@@ -260,7 +260,7 @@ m4_define([b4_lex_param_decl],
[$1])]) [$1])])
m4_define([b4_param_decls], m4_define([b4_param_decls],
[m4_map([b4_param_decl], [$@])]) [m4_map_args([b4_param_decl], $@)])
m4_define([b4_param_decl], [, $1]) m4_define([b4_param_decl], [, $1])
m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)]) m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)])
@@ -287,7 +287,7 @@ m4_define([b4_lex_param_call],
b4_param_calls(b4_lex_param))], b4_param_calls(b4_lex_param))],
[$1])]) [$1])])
m4_define([b4_param_calls], m4_define([b4_param_calls],
[m4_map([b4_param_call], [$@])]) [m4_map_args([b4_param_call], $@)])
m4_define([b4_param_call], [, $2]) m4_define([b4_param_call], [, $2])
@@ -300,7 +300,7 @@ m4_define([b4_parse_param_cons],
[b4_constructor_calls(b4_parse_param)])]) [b4_constructor_calls(b4_parse_param)])])
m4_define([b4_constructor_calls], m4_define([b4_constructor_calls],
[m4_map([b4_constructor_call], [$@])]) [m4_map_args([b4_constructor_call], $@)])
m4_define([b4_constructor_call], m4_define([b4_constructor_call],
[this.$2 = $2; [this.$2 = $2;
]) ])

View File

@@ -69,7 +69,7 @@ m4_define([b4_char_sizeof_],
m4_define([b4_char_sizeof], m4_define([b4_char_sizeof],
[b4_symbol_if([$1], [has_type], [b4_symbol_if([$1], [has_type],
[ [
m4_map([b4_char_sizeof_], [$@])dnl m4_map_args([b4_char_sizeof_], $@)dnl
char _b4_char_sizeof_dummy@{sizeof([b4_symbol([$1], [type])])@}; char _b4_char_sizeof_dummy@{sizeof([b4_symbol([$1], [type])])@};
])]) ])])