Change the internal prototype of the pop() and shift() builtins
Rafael Garcia-Suarez [Tue, 26 Aug 2003 19:37:29 +0000 (19:37 +0000)]
to (;\@), to reflect that their array argument is optional.

p4raw-id: //depot/perl@20910

opcode.h
opcode.pl

index 159d74d..4de3dee 100644 (file)
--- a/opcode.h
+++ b/opcode.h
@@ -1625,8 +1625,8 @@ EXT U32 PL_opargs[] = {
        0x00004805,     /* anonhash */
        0x05326801,     /* splice */
        0x0004691d,     /* push */
-       0x00007604,     /* pop */
-       0x00007604,     /* shift */
+       0x00017604,     /* pop */
+       0x00017604,     /* shift */
        0x0004691d,     /* unshift */
        0x0005a801,     /* sort */
        0x00004809,     /* reverse */
index 5a3beed..e13d14d 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -647,8 +647,8 @@ anonhash    anonymous hash ({})     ck_fun          ms@     L
 
 splice         splice                  ck_fun          m@      A S? S? L
 push           push                    ck_fun          imsT@   A L
-pop            pop                     ck_shift        s%      A
-shift          shift                   ck_shift        s%      A
+pop            pop                     ck_shift        s%      A?
+shift          shift                   ck_shift        s%      A?
 unshift                unshift                 ck_fun          imsT@   A L
 sort           sort                    ck_sort         m@      C? L
 reverse                reverse                 ck_fun          mt@     L