summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/Opcode/Opcode.pm2
-rw-r--r--lib/B/Op_private.pm1
-rw-r--r--opcode.h8
-rw-r--r--opnames.h3
-rw-r--r--pp.c4
-rw-r--r--pp_proto.h1
-rwxr-xr-xregen/opcode.pl2
-rw-r--r--regen/opcodes1
8 files changed, 19 insertions, 3 deletions
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index 54cc0dc35b..71b60df246 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -402,7 +402,7 @@ These are a hotchpotch of opcodes still waiting to be considered
once
- rv2gv refgen srefgen ref refassign
+ rv2gv refgen srefgen ref refassign lvref
bless -- could be used to change ownership of objects
(reblessing)
diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm
index d1270d965b..34564a975c 100644
--- a/lib/B/Op_private.pm
+++ b/lib/B/Op_private.pm
@@ -381,6 +381,7 @@ $bits{log}{0} = $bf[0];
@{$bits{lslice}}{1,0} = ($bf[1], $bf[1]);
$bits{lstat}{0} = $bf[0];
@{$bits{lt}}{1,0} = ($bf[1], $bf[1]);
+$bits{lvref}{0} = $bf[0];
$bits{mapwhile}{0} = $bf[0];
$bits{method}{0} = $bf[0];
$bits{method_named}{0} = $bf[0];
diff --git a/opcode.h b/opcode.h
index ff65502caa..4a0a91a302 100644
--- a/opcode.h
+++ b/opcode.h
@@ -528,6 +528,7 @@ EXTCONST char* const PL_op_name[] = {
"clonecv",
"padrange",
"refassign",
+ "lvref",
"freed",
};
#endif
@@ -916,6 +917,7 @@ EXTCONST char* const PL_op_desc[] = {
"private subroutine",
"list of private variables",
"lvalue ref assignment",
+ "lvalue ref assignment",
"freed op",
};
#endif
@@ -1318,6 +1320,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
Perl_pp_clonecv,
Perl_pp_padrange,
Perl_pp_refassign,
+ Perl_pp_lvref,
}
#endif
#ifdef PERL_PPADDR_INITED
@@ -1716,6 +1719,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
Perl_ck_null, /* clonecv */
Perl_ck_null, /* padrange */
Perl_ck_refassign, /* refassign */
+ Perl_ck_null, /* lvref */
}
#endif
#ifdef PERL_CHECK_INITED
@@ -2108,6 +2112,7 @@ EXTCONST U32 PL_opargs[] = {
0x00000040, /* clonecv */
0x00000040, /* padrange */
0x00000240, /* refassign */
+ 0x00000140, /* lvref */
};
#endif
@@ -2716,6 +2721,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = {
-1, /* clonecv */
630, /* padrange */
632, /* refassign */
+ 634, /* lvref */
};
@@ -3075,6 +3081,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* fc */ 0x0003,
/* padrange */ 0x25bc, 0x019b,
/* refassign */ 0x25bc, 0x0067,
+ /* lvref */ 0x0003,
};
@@ -3463,6 +3470,7 @@ EXTCONST U8 PL_op_private_valid[] = {
/* CLONECV */ (0),
/* PADRANGE */ (OPpPADRANGE_COUNTMASK|OPpLVAL_INTRO),
/* REFASSIGN */ (OPpARG2_MASK|OPpLVAL_INTRO),
+ /* LVREF */ (OPpARG1_MASK),
};
diff --git a/opnames.h b/opnames.h
index 52c29b5eb4..5125e166ed 100644
--- a/opnames.h
+++ b/opnames.h
@@ -394,10 +394,11 @@ typedef enum opcode {
OP_CLONECV = 377,
OP_PADRANGE = 378,
OP_REFASSIGN = 379,
+ OP_LVREF = 380,
OP_max
} opcode;
-#define MAXO 380
+#define MAXO 381
#define OP_FREED MAXO
/* the OP_IS_* macros are optimized to a simple range check because
diff --git a/pp.c b/pp.c
index 87db5bb8fa..1afacd4df7 100644
--- a/pp.c
+++ b/pp.c
@@ -6190,6 +6190,10 @@ PP(pp_refassign)
RETURN;
}
+PP(pp_lvref)
+{
+ DIE(aTHX_ "Unimplemented");
+}
/*
* Local variables:
diff --git a/pp_proto.h b/pp_proto.h
index 611725cae1..71221035ba 100644
--- a/pp_proto.h
+++ b/pp_proto.h
@@ -145,6 +145,7 @@ PERL_CALLCONV OP *Perl_pp_listen(pTHX);
PERL_CALLCONV OP *Perl_pp_lock(pTHX);
PERL_CALLCONV OP *Perl_pp_lslice(pTHX);
PERL_CALLCONV OP *Perl_pp_lt(pTHX);
+PERL_CALLCONV OP *Perl_pp_lvref(pTHX);
PERL_CALLCONV OP *Perl_pp_mapwhile(pTHX);
PERL_CALLCONV OP *Perl_pp_match(pTHX);
PERL_CALLCONV OP *Perl_pp_method(pTHX);
diff --git a/regen/opcode.pl b/regen/opcode.pl
index fe1488c259..10c708bb5c 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -55,7 +55,7 @@ while (<OPS>) {
$args = '' unless defined $args;
warn qq[Description "$desc" duplicates $seen{$desc}\n]
- if $seen{$desc} and $key !~ "transr|(?:intro|clone)cv";
+ if $seen{$desc} and $key !~ "transr|(?:intro|clone)cv|lvref";
die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key};
die qq[Opcode "freed" is reserved for the slab allocator\n]
if $key eq 'freed';
diff --git a/regen/opcodes b/regen/opcodes
index c40e3f98d4..0278fa551b 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -554,3 +554,4 @@ introcv private subroutine ck_null d0
clonecv private subroutine ck_null d0
padrange list of private variables ck_null d0
refassign lvalue ref assignment ck_refassign d2
+lvref lvalue ref assignment ck_null d1