diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-11-30 23:27:57 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-11-30 23:27:57 +0000 |
commit | 747e2fae43204b65ccf806e75ededd01638e4351 (patch) | |
tree | a00328c2e27760d7a70d9dcd17186d9bfe1967ef /scope.h | |
parent | e22024d3cff7db1071a80c1941fd213f9e45cd7c (diff) | |
download | perl-747e2fae43204b65ccf806e75ededd01638e4351.tar.gz |
Re-implement the macros SAVECOMPPAD(), SAVECOMPILEWARNINGS(),
SAVEPARSER() in terms of save_pushptr(). This shinks the exectuable
by about 4K. Maybe some of the other scope.h macros should become
functions.
p4raw-id: //depot/perl@34958
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 21 |
1 files changed, 3 insertions, 18 deletions
@@ -174,12 +174,7 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. SSPUSHINT(SAVEt_HINTS); \ } STMT_END -#define SAVECOMPPAD() \ - STMT_START { \ - SSCHECK(2); \ - SSPUSHPTR(MUTABLE_SV(PL_comppad)); \ - SSPUSHINT(SAVEt_COMPPAD); \ - } STMT_END +#define SAVECOMPPAD() save_pushptr(MUTABLE_SV(PL_comppad), SAVEt_COMPPAD) #define SAVESWITCHSTACK(f,t) \ STMT_START { \ @@ -204,12 +199,7 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. could have done savefreesharedpvREF, but this way actually seems cleaner, as it simplifies the code that does the saves, and reduces the load on the save stack. */ -#define SAVECOMPILEWARNINGS() \ - STMT_START { \ - SSCHECK(2); \ - SSPUSHPTR(PL_compiling.cop_warnings); \ - SSPUSHINT(SAVEt_COMPILE_WARNINGS); \ - } STMT_END +#define SAVECOMPILEWARNINGS() save_pushptr(PL_compiling.cop_warnings, SAVEt_COMPILE_WARNINGS) #define SAVESTACK_CXPOS() \ STMT_START { \ @@ -219,12 +209,7 @@ Closing bracket on a callback. See C<ENTER> and L<perlcall>. SSPUSHINT(SAVEt_STACK_CXPOS); \ } STMT_END -#define SAVEPARSER(p) \ - STMT_START { \ - SSCHECK(2); \ - SSPUSHPTR(p); \ - SSPUSHINT(SAVEt_PARSER); \ - } STMT_END +#define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) #ifdef USE_ITHREADS # define SAVECOPSTASH(c) SAVEPPTR(CopSTASHPV(c)) |