Add OPpLVALUE flag
authorFather Chrysostomos <sprout@cpan.org>
Thu, 24 Oct 2013 02:33:50 +0000 (19:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 24 Oct 2013 02:33:50 +0000 (19:33 -0700)
This flag will be used by the next commit.

dump.c
ext/B/B/Concise.pm
op.h

diff --git a/dump.c b/dump.c
index 0202522..78e9aa9 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -774,6 +774,11 @@ const struct flag_to_name op_sassign_names[] = {
     {OPpASSIGN_CV_TO_GV,  ",CV2GV"}
 };
 
+const struct flag_to_name op_leave_names[] = {
+    {OPpREFCOUNTED, ",REFCOUNTED"},
+    {OPpLVALUE,            ",LVALUE"}
+};
+
 #define OP_PRIVATE_ONCE(op, flag, name) \
     const struct flag_to_name CAT2(op, _names)[] = {   \
        {(flag), (name)} \
@@ -799,7 +804,7 @@ struct op_private_by_op {
 
 const struct op_private_by_op op_private_names[] = {
     {OP_LEAVESUB, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
-    {OP_LEAVE, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
+    {OP_LEAVE, C_ARRAY_LENGTH(op_leave_names), op_leave_names },
     {OP_LEAVESUBLV, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
     {OP_LEAVEWRITE, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
     {OP_DIE, C_ARRAY_LENGTH(op_die_names), op_die_names },
index dedae5a..6bb983d 100644 (file)
@@ -598,6 +598,7 @@ $priv{$_}{128} = "LVINTRO"
          aelem helem aslice hslice padsv padav padhv enteriter entersub
          padrange pushmark);
 $priv{$_}{64} = "REFC" for qw(leave leavesub leavesublv leavewrite);
+$priv{leave}{128} = "LV";
 @{$priv{aassign}}{32,64} = qw(STATE COMMON);
 @{$priv{sassign}}{32,64,128} = qw(STATE BKWARD CV2GV);
 $priv{$_}{64} = "RTIME" for qw(match subst substcont qr);
diff --git a/op.h b/op.h
index 5d29199..3670caf 100644 (file)
--- a/op.h
+++ b/op.h
@@ -172,6 +172,9 @@ Deprecated.  Use C<GIMME_V> instead.
 /* Private for OP_LEAVE, OP_LEAVESUB, OP_LEAVESUBLV and OP_LEAVEWRITE */
 #define OPpREFCOUNTED          64      /* op_targ carries a refcount */
 
+/* Private for OP_LEAVE only */
+#define OPpLVALUE              128     /* Do not copy return value */
+
 /* Private for OP_AASSIGN */
 #define OPpASSIGN_COMMON       64      /* Left & right have syms in common. */