summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-09 11:27:19 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-09 11:59:14 +0000
commit981b7185ef2472d1c02fc44a48e3319544ae0baf (patch)
tree17d8128afa9ae24a810beffe6a2382b35a08c9f9 /regen
parent897d398936dd2fc088a265fba2a7b62fa97ed458 (diff)
downloadperl-981b7185ef2472d1c02fc44a48e3319544ae0baf.tar.gz
regen/opcode.pl should only generate prototypes for pp_* functions that exist.
It now generates prototypes for all functions that implement OPs. Hence Perl_unimplemented_op no longer needs a special-case prototype. As it is now generating a prototype for Perl_do_kv, no need for regen/embed.pl to duplicate this. Convert the last two users of the macro do_kv() to Perl_do_kv(aTHX).
Diffstat (limited to 'regen')
-rwxr-xr-xregen/opcode.pl17
1 files changed, 7 insertions, 10 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl
index dd53aec81b..6e1ad225d9 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -151,12 +151,6 @@ for (@ops) {
print "#define Perl_pp_$_ $alias{$_}\n" if $alias{$_};
}
-print <<'END';
-
-PERL_PPDEF(Perl_unimplemented_op)
-
-END
-
print $on <<"END";
/* -*- buffer-read-only: t -*-
*
@@ -481,10 +475,13 @@ print $pp <<"END";
END
-for (sort @ops) {
- next if /^i_(pre|post)(inc|dec)$/;
- next if /^custom$/;
- print $pp "PERL_CALLCONV OP *Perl_pp_$_(pTHX);\n";
+{
+ my %funcs;
+ for (@ops) {
+ my $name = $alias{$_} || "Perl_pp_$_";
+ ++$funcs{$name};
+ }
+ print $pp "PERL_CALLCONV OP *$_(pTHX);\n" foreach sort keys %funcs;
}
print $pp "\n/* ex: set ro: */\n";