revise block_givwhen for sole use by "when"
authorZefram <zefram@fysh.org>
Wed, 29 Nov 2017 15:22:49 +0000 (15:22 +0000)
committerZefram <zefram@fysh.org>
Wed, 29 Nov 2017 15:22:49 +0000 (15:22 +0000)
This context frame type doesn't need to cater for "given" any more.

cop.h
inline.h
pp_ctl.c

diff --git a/cop.h b/cop.h
index 5c66752..c26fc18 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -721,10 +721,9 @@ struct block_loop {
 
 
 
-/* given/when context */
-struct block_givwhen {
+/* when context */
+struct block_when {
        OP *leave_op;
-        SV *defsv_save; /* the original $_ */
 };
 
 
@@ -748,7 +747,7 @@ struct block {
        struct block_format     blku_format;
        struct block_eval       blku_eval;
        struct block_loop       blku_loop;
-       struct block_givwhen    blku_givwhen;
+       struct block_when       blku_when;
     } blk_u;
 };
 #define blk_oldsp      cx_u.cx_blk.blku_oldsp
@@ -764,7 +763,7 @@ struct block {
 #define blk_format     cx_u.cx_blk.blk_u.blku_format
 #define blk_eval       cx_u.cx_blk.blk_u.blku_eval
 #define blk_loop       cx_u.cx_blk.blk_u.blku_loop
-#define blk_givwhen    cx_u.cx_blk.blk_u.blku_givwhen
+#define blk_when       cx_u.cx_blk.blk_u.blku_when
 
 #define CX_DEBUG(cx, action)                                           \
     DEBUG_l(                                                           \
index e00dd22..8c28d98 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -1636,7 +1636,7 @@ S_cx_pushwhen(pTHX_ PERL_CONTEXT *cx)
 {
     PERL_ARGS_ASSERT_CX_PUSHWHEN;
 
-    cx->blk_givwhen.leave_op = cLOGOP->op_other;
+    cx->blk_when.leave_op = cLOGOP->op_other;
 }
 
 
index e8fcd46..1ab2eea 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4733,7 +4733,7 @@ PP(pp_continue)
     CX_LEAVE_SCOPE(cx);
     cx_popwhen(cx);
     cx_popblock(cx);
-    nextop = cx->blk_givwhen.leave_op->op_next;
+    nextop = cx->blk_when.leave_op->op_next;
     CX_POP(cx);
 
     return nextop;