This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Investigation reveals that the work of restoring the iterator to the
authorNicholas Clark <nick@ccl4.org>
Sat, 26 Jan 2008 17:54:29 +0000 (17:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 26 Jan 2008 17:54:29 +0000 (17:54 +0000)
commit09edbca0f5c7caf9dd4acef80d8e6275e5a95ea1
treee0dc9093a93c63c250e26059deebe7f51400a7ca
parentdceb5f6256f15f796b36d673cf34f57b7feb1127
Investigation reveals that the work of restoring the iterator to the
pad is shared between POPLOOP, using itersave, and the end of scope
restore action requested by Perl_save_padsv(). In fact, the only user
of SAVEt_PADSV is pp_enteriter, and it already provides enough
information to allow it to perform the sv_2mortal() in POPLOOP.
So make it do so. Rather than creating a new routine, use the existing
routine because nothing else (at least nothing else known to Google's
codesearch) uses it. But rename it just in case something we can't see
is being naughty and using our private functions - they will get
link errors against 5.12.

All this means that itersave is now redundant. So remove it.
This makes struct context 48 bytes on ILP32 platforms with 32bit IVs,
down from 64 bytes in 5.10. 33% more context stack in the same memory.

p4raw-id: //depot/perl@33080
cop.h
embed.fnc
embed.h
pp_ctl.c
proto.h
scope.c
scope.h
sv.c