summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opcode.h8
-rwxr-xr-xopcode.pl5
-rw-r--r--pod/perldiag.pod9
-rw-r--r--pp.c7
4 files changed, 21 insertions, 8 deletions
diff --git a/opcode.h b/opcode.h
index 5aef24e486..ab72fedb44 100644
--- a/opcode.h
+++ b/opcode.h
@@ -20,6 +20,8 @@
#define Perl_pp_i_postinc Perl_pp_postinc
#define Perl_pp_i_postdec Perl_pp_postdec
+PERL_PPDEF(Perl_unimplemented_op)
+
START_EXTERN_C
#define OP_NAME(o) ((o)->op_type == OP_CUSTOM ? custom_op_name(o) : \
@@ -776,7 +778,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
MEMBER_TO_FPTR(Perl_pp_padsv),
MEMBER_TO_FPTR(Perl_pp_padav),
MEMBER_TO_FPTR(Perl_pp_padhv),
- MEMBER_TO_FPTR(Perl_pp_padany),
+ MEMBER_TO_FPTR(Perl_unimplemented_op), /* Perl_pp_padany */
MEMBER_TO_FPTR(Perl_pp_pushre),
MEMBER_TO_FPTR(Perl_pp_rv2gv),
MEMBER_TO_FPTR(Perl_pp_rv2sv),
@@ -918,7 +920,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
MEMBER_TO_FPTR(Perl_pp_reverse),
MEMBER_TO_FPTR(Perl_pp_grepstart),
MEMBER_TO_FPTR(Perl_pp_grepwhile),
- MEMBER_TO_FPTR(Perl_pp_mapstart),
+ MEMBER_TO_FPTR(Perl_unimplemented_op), /* Perl_pp_mapstart */
MEMBER_TO_FPTR(Perl_pp_mapwhile),
MEMBER_TO_FPTR(Perl_pp_range),
MEMBER_TO_FPTR(Perl_pp_flip),
@@ -1112,7 +1114,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
MEMBER_TO_FPTR(Perl_pp_getlogin),
MEMBER_TO_FPTR(Perl_pp_syscall),
MEMBER_TO_FPTR(Perl_pp_lock),
- MEMBER_TO_FPTR(Perl_pp_threadsv),
+ MEMBER_TO_FPTR(Perl_unimplemented_op), /* Perl_pp_threadsv */
MEMBER_TO_FPTR(Perl_pp_setstate),
MEMBER_TO_FPTR(Perl_pp_method_named),
MEMBER_TO_FPTR(Perl_pp_dor),
diff --git a/opcode.pl b/opcode.pl
index ffe4901924..e3b9056b4e 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -40,7 +40,8 @@ my %alias;
# Format is "this function" => "does these op names"
my @raw_alias = (
Perl_do_kv => [qw( keys values )],
- );
+ Perl_unimplemented_op => [qw(padany threadsv mapstart)],
+ );
while (my ($func, $names) = splice @raw_alias, 0, 2) {
$alias{$_} = $func for @$names;
@@ -72,6 +73,8 @@ print <<"END";
#define Perl_pp_i_postinc Perl_pp_postinc
#define Perl_pp_i_postdec Perl_pp_postdec
+PERL_PPDEF(Perl_unimplemented_op)
+
END
print ON <<"END";
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 42a1fcbdcd..3c16b0d2b6 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -2916,10 +2916,6 @@ references to an object.
(P) Something requested a negative number of bytes of malloc.
-=item panic: mapstart
-
-(P) The compiler is screwed up with respect to the map() function.
-
=item panic: memory wrap
(P) Something tried to allocate more memory than possible.
@@ -3000,6 +2996,11 @@ was string.
(P) The compiler attempted to do a goto, or something weird like that.
+=item panic: unimplemented op %s (#%d) called
+
+(P) The compiler is screwed up and attempted to use an op that isn't permitted
+at run time.
+
=item panic: utf16_to_utf8: odd bytelen
(P) Something tried to call utf16_to_utf8 with an odd (as opposed
diff --git a/pp.c b/pp.c
index 8ae5a075c2..ddffda824c 100644
--- a/pp.c
+++ b/pp.c
@@ -4785,6 +4785,13 @@ PP(pp_lock)
RETURN;
}
+
+PP(unimplemented_op)
+{
+ DIE(aTHX_ "panic: unimplemented op %s (#%d) called", OP_NAME(PL_op),
+ PL_op->op_type);
+}
+
/*
* Local variables:
* c-indentation-style: bsd