X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.h;h=50b40faf7d719b4e1840a7bcd37529a549c7a310;hb=7dcda43074c71d11cd90211ea44a51a39b19fd4e;hp=9a24ac9622a714985c19fad28ef2918aabc54385;hpb=3f774658ecc4b04691265c9db31d70a4a611b290;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.h b/scope.h index 9a24ac9..50b40fa 100644 --- a/scope.h +++ b/scope.h @@ -1,6 +1,7 @@ /* scope.h * - * Copyright (c) 1997-2002, Larry Wall + * Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, + * 2000, 2001, 2002, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -46,12 +47,14 @@ #define SAVEt_MORTALIZESV 36 #define SAVEt_SHARED_PVREF 37 #define SAVEt_BOOL 38 +#define SAVEt_SET_SVFLAGS 39 #ifndef SCOPE_SAVES_SIGNAL_MASK #define SCOPE_SAVES_SIGNAL_MASK 0 #endif -#define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow() +#define SSCHECK(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow() +#define SSGROW(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow_cnt(need) #define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) #define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i)) #define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p)) @@ -94,13 +97,11 @@ Closing bracket on a callback. See C and L. #define ENTER \ STMT_START { \ push_scope(); \ - DEBUG_l(WITH_THR(Perl_deb(aTHX_ "ENTER scope %ld at %s:%d\n", \ - PL_scopestack_ix, __FILE__, __LINE__))); \ + DEBUG_SCOPE("ENTER") \ } STMT_END #define LEAVE \ STMT_START { \ - DEBUG_l(WITH_THR(Perl_deb(aTHX_ "LEAVE scope %ld at %s:%d\n", \ - PL_scopestack_ix, __FILE__, __LINE__))); \ + DEBUG_SCOPE("LEAVE") \ pop_scope(); \ } STMT_END #else @@ -132,6 +133,7 @@ Closing bracket on a callback. See C and L. #define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) #define SAVEGENERICPV(s) save_generic_pvref((char**)&(s)) #define SAVESHAREDPV(s) save_shared_pvref((char**)&(s)) +#define SAVESETSVFLAGS(sv,mask,val) save_set_svflags(sv,mask,val) #define SAVEDELETE(h,k,l) \ save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l)) #define SAVEDESTRUCTOR(f,p) \ @@ -179,7 +181,7 @@ Closing bracket on a callback. See C and L. # define SAVECOPFILE_FREE(c) SAVEGENERICSV(CopFILEGV(c)) #endif -#define SAVECOPLINE(c) SAVEI16(CopLINE(c)) +#define SAVECOPLINE(c) SAVEI32(CopLINE(c)) /* SSNEW() temporarily allocates a specified number of bytes of data on the * savestack. It returns an integer index into the savestack, because a