diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-01-02 19:13:12 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-01-09 09:04:40 +0000 |
commit | 9561d06f3dc19930c1acfa8c2e046c80782cb876 (patch) | |
tree | ca57dd751a9c5896ba414d029712a7b82b4d54c8 /regen | |
parent | f1aaabf80b19a3cc6dc435510732b561ab46361e (diff) | |
download | perl-9561d06f3dc19930c1acfa8c2e046c80782cb876.tar.gz |
Replace OP stubs in mathoms.c with #define aliases in opcode.h
External code that references OPs by name will still link (and work).
Unlike the other compatibility functions in mathoms.c, the OP stubs were simply
making calls onwards to their replacements, so simply taking up space without
adding anything.
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/opcode.pl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl index 6501380d3d..5b7aee73ab 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -107,10 +107,14 @@ my @raw_alias = ( Perl_pp_rv2av => ['rv2hv'], Perl_pp_akeys => ['avalues'], Perl_pp_rkeys => [qw(rvalues reach)], - Perl_pp_trans => [qw(trans transr)], - Perl_pp_chop => [qw(chop chomp)], - Perl_pp_schop => [qw(schop schomp)], + Perl_pp_trans => ['transr'], + Perl_pp_chop => ['chomp'], + Perl_pp_schop => ['schomp'], Perl_pp_bind => ['connect'], + Perl_pp_preinc => ['i_preinc'], + Perl_pp_predec => ['i_predec'], + Perl_pp_postinc => ['i_postinc'], + Perl_pp_postdec => ['i_postdec'], ); while (my ($func, $names) = splice @raw_alias, 0, 2) { @@ -139,10 +143,13 @@ print <<"END"; #ifndef PERL_GLOBAL_STRUCT_INIT -#define Perl_pp_i_preinc Perl_pp_preinc -#define Perl_pp_i_predec Perl_pp_predec -#define Perl_pp_i_postinc Perl_pp_postinc -#define Perl_pp_i_postdec Perl_pp_postdec +END + +for (@ops) { + print "#define Perl_pp_$_ $alias{$_}\n" if $alias{$_}; +} + +print <<'END'; PERL_PPDEF(Perl_unimplemented_op) |