summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-26 17:54:29 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-26 17:54:29 +0000
commit09edbca0f5c7caf9dd4acef80d8e6275e5a95ea1 (patch)
treee0dc9093a93c63c250e26059deebe7f51400a7ca /embed.h
parentdceb5f6256f15f796b36d673cf34f57b7feb1127 (diff)
downloadperl-09edbca0f5c7caf9dd4acef80d8e6275e5a95ea1.tar.gz
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
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/embed.h b/embed.h
index c0bcae2001..8d2d11e18f 100644
--- a/embed.h
+++ b/embed.h
@@ -781,7 +781,7 @@
#define save_pptr Perl_save_pptr
#define save_vptr Perl_save_vptr
#define save_re_context Perl_save_re_context
-#define save_padsv Perl_save_padsv
+#define save_padsv_and_mortalize Perl_save_padsv_and_mortalize
#define save_sptr Perl_save_sptr
#define save_svref Perl_save_svref
#ifdef PERL_CORE
@@ -3085,7 +3085,7 @@
#define save_pptr(a) Perl_save_pptr(aTHX_ a)
#define save_vptr(a) Perl_save_vptr(aTHX_ a)
#define save_re_context() Perl_save_re_context(aTHX)
-#define save_padsv(a) Perl_save_padsv(aTHX_ a)
+#define save_padsv_and_mortalize(a) Perl_save_padsv_and_mortalize(aTHX_ a)
#define save_sptr(a) Perl_save_sptr(aTHX_ a)
#define save_svref(a) Perl_save_svref(aTHX_ a)
#ifdef PERL_CORE