diff options
author | David Mitchell <davem@iabyn.com> | 2015-10-17 00:18:44 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:18:29 +0000 |
commit | 93661e56c6b52b1bf34963a3a62b2a766381cccd (patch) | |
tree | 8948b55e3e1b49cbe32d79b407abedf985c121b3 /opcode.h | |
parent | 0724084c5ac1086f135da52e9e7cf29cc2280640 (diff) | |
download | perl-93661e56c6b52b1bf34963a3a62b2a766381cccd.tar.gz |
split CXt_LOOP_FOR into CXt_LOOP_LIST,CXt_LOOP_ARY
Create a new context type so that "for (1,2,3)" and "for (@ary)"
are now two separate types.
For the list type, we store the index of the base stack element in the
state union rather than having an array pointer. Currently this is just
the same as blk_resetsp, but this will shortly allow us to eliminate the
resetsp field from the struct block_loop - which is currently the largest
sub-struct within the block union.
Having two separate types also allows the two cases to be handled directly
in the main switch in the hot pp_iter code, rather than having extra
conditionals.
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2190,6 +2190,7 @@ END_EXTERN_C #define OPpEVAL_HAS_HH 0x02 #define OPpFT_ACCESS 0x02 #define OPpHINT_STRICT_REFS 0x02 +#define OPpITER_REVERSED 0x02 #define OPpSORT_INTEGER 0x02 #define OPpTRANS_TO_UTF 0x02 #define OPpARG2_MASK 0x03 @@ -2198,7 +2199,6 @@ END_EXTERN_C #define OPpENTERSUB_HASTARG 0x04 #define OPpEVAL_UNICODE 0x04 #define OPpFT_STACKED 0x04 -#define OPpITER_REVERSED 0x04 #define OPpLVREF_ELEM 0x04 #define OPpSLICEWARNING 0x04 #define OPpSORT_REVERSE 0x04 @@ -2873,8 +2873,8 @@ EXTCONST U16 PL_op_private_bitdefs[] = { 0x00bc, 0x012f, /* caller */ 0x21f5, /* nextstate, dbstate */ 0x29fc, 0x33d9, /* leave */ - 0x2b5c, 0x3078, 0x0e8c, 0x36e9, /* enteriter */ - 0x36e9, /* iter */ + 0x2b5c, 0x3078, 0x0e8c, 0x36e5, /* enteriter */ + 0x36e5, /* iter */ 0x29fc, 0x0067, /* leaveloop */ 0x41dc, 0x0003, /* last, next, redo, dump, goto */ 0x325c, 0x3178, 0x2634, 0x2570, 0x012f, /* open */ |