This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
split CXt_LOOP_FOR into CXt_LOOP_LIST,CXt_LOOP_ARY
authorDavid Mitchell <davem@iabyn.com>
Fri, 16 Oct 2015 23:18:44 +0000 (00:18 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 09:18:29 +0000 (09:18 +0000)
commit93661e56c6b52b1bf34963a3a62b2a766381cccd
tree8948b55e3e1b49cbe32d79b407abedf985c121b3
parent0724084c5ac1086f135da52e9e7cf29cc2280640
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.
cop.h
lib/B/Op_private.pm
opcode.h
perl.h
pp_ctl.c
pp_hot.c
regen/op_private
scope.c
sv.c