This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove unused arg from newGIVWHENOP()
authorZefram <zefram@fysh.org>
Tue, 21 Nov 2017 18:28:31 +0000 (18:28 +0000)
committerZefram <zefram@fysh.org>
Tue, 21 Nov 2017 18:28:31 +0000 (18:28 +0000)
The entertarg argument hasn't been used for a long time.

embed.fnc
embed.h
op.c
proto.h

index e4b3194..496a2eb 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2141,8 +2141,7 @@ sR        |OP*    |no_fh_allowed|NN OP *o
 sR     |OP*    |too_few_arguments_pv|NN OP *o|NN const char* name|U32 flags
 s      |OP*    |too_many_arguments_pv|NN OP *o|NN const char* name|U32 flags
 s      |OP*    |newGIVWHENOP   |NULLOK OP* cond|NN OP *block \
-                               |I32 enter_opcode|I32 leave_opcode \
-                               |PADOFFSET entertarg
+                               |I32 enter_opcode|I32 leave_opcode
 s      |OP*    |ref_array_or_hash|NULLOK OP* cond
 s      |bool   |process_special_blocks |I32 floor \
                                        |NN const char *const fullname\
diff --git a/embed.h b/embed.h
index d6f8aa2..edadfc0 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define modkids(a,b)           S_modkids(aTHX_ a,b)
 #define move_proto_attr(a,b,c,d)       S_move_proto_attr(aTHX_ a,b,c,d)
 #define my_kid(a,b,c)          S_my_kid(aTHX_ a,b,c)
-#define newGIVWHENOP(a,b,c,d,e)        S_newGIVWHENOP(aTHX_ a,b,c,d,e)
+#define newGIVWHENOP(a,b,c,d)  S_newGIVWHENOP(aTHX_ a,b,c,d)
 #define newMETHOP_internal(a,b,c,d)    S_newMETHOP_internal(aTHX_ a,b,c,d)
 #define new_logop(a,b,c,d)     S_new_logop(aTHX_ a,b,c,d)
 #define no_bareword_allowed(a) S_no_bareword_allowed(aTHX_ a)
diff --git a/op.c b/op.c
index 67a7f00..73b5bb8 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8809,16 +8809,13 @@ S_ref_array_or_hash(pTHX_ OP *cond)
  */
 
 STATIC OP *
-S_newGIVWHENOP(pTHX_ OP *cond, OP *block,
-                  I32 enter_opcode, I32 leave_opcode,
-                  PADOFFSET entertarg)
+S_newGIVWHENOP(pTHX_ OP *cond, OP *block, I32 enter_opcode, I32 leave_opcode)
 {
     dVAR;
     LOGOP *enterop;
     OP *o;
 
     PERL_ARGS_ASSERT_NEWGIVWHENOP;
-    PERL_UNUSED_ARG(entertarg); /* used to indicate targ of lexical $_ */
 
     enterop = alloc_LOGOP(enter_opcode, block, NULL);
     enterop->op_targ = 0;
@@ -8870,7 +8867,7 @@ Perl_newGIVENOP(pTHX_ OP *cond, OP *block, PADOFFSET defsv_off)
     PERL_UNUSED_ARG(defsv_off);
 
     assert(!defsv_off);
-    return newGIVWHENOP(cond, block, OP_ENTERGIVEN, OP_LEAVEGIVEN, 0);
+    return newGIVWHENOP(cond, block, OP_ENTERGIVEN, OP_LEAVEGIVEN);
 }
 
 /*
@@ -8889,7 +8886,7 @@ OP *
 Perl_newWHENOP(pTHX_ OP *cond, OP *block)
 {
     PERL_ARGS_ASSERT_NEWWHENOP;
-    return newGIVWHENOP(cond, block, OP_ENTERWHEN, OP_LEAVEWHEN, 0);
+    return newGIVWHENOP(cond, block, OP_ENTERWHEN, OP_LEAVEWHEN);
 }
 
 /* must not conflict with SVf_UTF8 */
diff --git a/proto.h b/proto.h
index de88b79..c3ed9dd 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4744,7 +4744,7 @@ STATIC void       S_move_proto_attr(pTHX_ OP **proto, OP **attrs, const GV *name, bool
 STATIC OP *    S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp);
 #define PERL_ARGS_ASSERT_MY_KID        \
        assert(imopsp)
-STATIC OP*     S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode, PADOFFSET entertarg);
+STATIC OP*     S_newGIVWHENOP(pTHX_ OP* cond, OP *block, I32 enter_opcode, I32 leave_opcode);
 #define PERL_ARGS_ASSERT_NEWGIVWHENOP  \
        assert(block)
 #ifndef PERL_NO_INLINE_FUNCTIONS