diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-11-30 22:46:37 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-11-30 22:46:37 +0000 |
commit | 2fd8beea017eccf05d12bfa6e4db7c5340ce637b (patch) | |
tree | 49346b27333d4b5a7519f212fe63cced96e2933a /scope.c | |
parent | c6ae76470e6575530141df6c32cf71111bc2e391 (diff) | |
download | perl-2fd8beea017eccf05d12bfa6e4db7c5340ce637b.tar.gz |
Convert all the scope save functions of the form
SSCHECK(2);
SSPUSHPTR(o);
SSPUSHINT(SAVEt_FREEOP);
into a single function Perl_save_pushptr(ptr, type), which the others
call. Implement the others as macros. This reduces the object code size.
p4raw-id: //depot/perl@34956
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 45 |
1 files changed, 3 insertions, 42 deletions
@@ -505,42 +505,12 @@ Perl_save_aptr(pTHX_ AV **aptr) } void -Perl_save_freesv(pTHX_ SV *sv) +Perl_save_pushptr(pTHX_ void *const ptr, const int type) { dVAR; SSCHECK(2); - SSPUSHPTR(sv); - SSPUSHINT(SAVEt_FREESV); -} - -void -Perl_save_mortalizesv(pTHX_ SV *sv) -{ - dVAR; - - PERL_ARGS_ASSERT_SAVE_MORTALIZESV; - - SSCHECK(2); - SSPUSHPTR(sv); - SSPUSHINT(SAVEt_MORTALIZESV); -} - -void -Perl_save_freeop(pTHX_ OP *o) -{ - dVAR; - SSCHECK(2); - SSPUSHPTR(o); - SSPUSHINT(SAVEt_FREEOP); -} - -void -Perl_save_freepv(pTHX_ char *pv) -{ - dVAR; - SSCHECK(2); - SSPUSHPTR(pv); - SSPUSHINT(SAVEt_FREEPV); + SSPUSHPTR(ptr); + SSPUSHINT(type); } void @@ -660,15 +630,6 @@ Perl_save_svref(pTHX_ SV **sptr) return save_scalar_at(sptr, SAVEf_SETMAGIC); /* XXX - FIXME - see #60360 */ } -void -Perl_save_op(pTHX) -{ - dVAR; - SSCHECK(2); - SSPUSHPTR(PL_op); - SSPUSHINT(SAVEt_OP); -} - I32 Perl_save_alloc(pTHX_ I32 size, I32 pad) { |