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.c5
-rw-r--r--pp_proto.h1
-rw-r--r--regen/opcodes1
7 files changed, 19 insertions, 2 deletions
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index 3da8d945cb..109ebb9931 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
+ rv2gv refgen srefgen ref refassign
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 19e9561cce..93532217bb 100644
--- a/lib/B/Op_private.pm
+++ b/lib/B/Op_private.pm
@@ -427,6 +427,7 @@ $bits{readlink}{0} = $bf[0];
@{$bits{recv}}{3,2,1,0} = ($bf[3], $bf[3], $bf[3], $bf[3]);
$bits{redo}{0} = $bf[0];
$bits{ref}{0} = $bf[0];
+@{$bits{refassign}}{1,0} = ($bf[1], $bf[1]);
$bits{refgen}{0} = $bf[0];
$bits{regcmaybe}{0} = $bf[0];
$bits{regcomp}{0} = $bf[0];
diff --git a/opcode.h b/opcode.h
index c2ff500ed7..86e42b0894 100644
--- a/opcode.h
+++ b/opcode.h
@@ -527,6 +527,7 @@ EXTCONST char* const PL_op_name[] = {
"introcv",
"clonecv",
"padrange",
+ "refassign",
"freed",
};
#endif
@@ -914,6 +915,7 @@ EXTCONST char* const PL_op_desc[] = {
"private subroutine",
"private subroutine",
"list of private variables",
+ "lvalue ref assignment",
"freed op",
};
#endif
@@ -1315,6 +1317,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */
Perl_pp_introcv,
Perl_pp_clonecv,
Perl_pp_padrange,
+ Perl_pp_refassign,
}
#endif
#ifdef PERL_PPADDR_INITED
@@ -1712,6 +1715,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */
Perl_ck_null, /* introcv */
Perl_ck_null, /* clonecv */
Perl_ck_null, /* padrange */
+ Perl_ck_null, /* refassign */
}
#endif
#ifdef PERL_CHECK_INITED
@@ -2103,6 +2107,7 @@ EXTCONST U32 PL_opargs[] = {
0x00000040, /* introcv */
0x00000040, /* clonecv */
0x00000040, /* padrange */
+ 0x00000240, /* refassign */
};
#endif
@@ -2710,6 +2715,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = {
-1, /* introcv */
-1, /* clonecv */
630, /* padrange */
+ 632, /* refassign */
};
@@ -3068,6 +3074,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = {
/* runcv */ 0x00bd,
/* fc */ 0x0003,
/* padrange */ 0x25bc, 0x019b,
+ /* refassign */ 0x0067,
};
@@ -3455,6 +3462,7 @@ EXTCONST U8 PL_op_private_valid[] = {
/* INTROCV */ (0),
/* CLONECV */ (0),
/* PADRANGE */ (OPpPADRANGE_COUNTMASK|OPpLVAL_INTRO),
+ /* REFASSIGN */ (OPpARG2_MASK),
};
diff --git a/opnames.h b/opnames.h
index 68ce927cd9..52c29b5eb4 100644
--- a/opnames.h
+++ b/opnames.h
@@ -393,10 +393,11 @@ typedef enum opcode {
OP_INTROCV = 376,
OP_CLONECV = 377,
OP_PADRANGE = 378,
+ OP_REFASSIGN = 379,
OP_max
} opcode;
-#define MAXO 379
+#define MAXO 380
#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 c14eb3ab59..7a34e24ea8 100644
--- a/pp.c
+++ b/pp.c
@@ -6160,6 +6160,11 @@ PP(pp_runcv)
RETURN;
}
+PP(pp_refassign)
+{
+ DIE(aTHX_ "Unimplemented");
+}
+
/*
* Local variables:
diff --git a/pp_proto.h b/pp_proto.h
index 73ff532b5c..611725cae1 100644
--- a/pp_proto.h
+++ b/pp_proto.h
@@ -192,6 +192,7 @@ PERL_CALLCONV OP *Perl_pp_readline(pTHX);
PERL_CALLCONV OP *Perl_pp_readlink(pTHX);
PERL_CALLCONV OP *Perl_pp_redo(pTHX);
PERL_CALLCONV OP *Perl_pp_ref(pTHX);
+PERL_CALLCONV OP *Perl_pp_refassign(pTHX);
PERL_CALLCONV OP *Perl_pp_refgen(pTHX);
PERL_CALLCONV OP *Perl_pp_regcomp(pTHX);
PERL_CALLCONV OP *Perl_pp_regcreset(pTHX);
diff --git a/regen/opcodes b/regen/opcodes
index 313695b71c..6e332117d0 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -553,3 +553,4 @@ padcv private subroutine ck_null d0
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_null d2