X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.h;h=9943a05876bf7a7083b982fbd069912e5a2c9044;hb=b2a156bd8e464af88881c77344280160fd844dcf;hp=5efb8fca53252a3be25fc351259d0768ee714d36;hpb=72dc9ed5af65c946f73050becea29207a1af86c1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.h b/scope.h index 5efb8fc..9943a05 100644 --- a/scope.h +++ b/scope.h @@ -51,15 +51,14 @@ #define SAVEt_SAVESWITCHSTACK 40 #define SAVEt_COP_ARYBASE 41 #define SAVEt_RE_STATE 42 -#define SAVEt_FREESHAREDPV 43 -#define SAVEt_COP_WARNINGS 44 +#define SAVEt_COMPILE_WARNINGS 43 #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 SSGROW(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow_cnt(need) +#define SSCHECK(need) if (PL_savestack_ix + (I32)(need) > PL_savestack_max) savestack_grow() +#define SSGROW(need) if (PL_savestack_ix + (I32)(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)) @@ -159,12 +158,12 @@ Closing bracket on a callback. See C and L. SSPUSHPTR(GvHV(PL_hintgv)); \ GvHV(PL_hintgv) = Perl_hv_copy_hints_hv(aTHX_ GvHV(PL_hintgv)); \ } \ - if (PL_compiling.cop_hints) { \ + if (PL_compiling.cop_hints_hash) { \ HINTS_REFCNT_LOCK; \ - PL_compiling.cop_hints->refcounted_he_refcnt++; \ + PL_compiling.cop_hints_hash->refcounted_he_refcnt++; \ HINTS_REFCNT_UNLOCK; \ } \ - SSPUSHPTR(PL_compiling.cop_hints); \ + SSPUSHPTR(PL_compiling.cop_hints_hash); \ SSPUSHINT(PL_hints); \ SSPUSHINT(SAVEt_HINTS); \ } STMT_END @@ -194,24 +193,16 @@ Closing bracket on a callback. See C and L. SSPUSHINT(SAVEt_COP_ARYBASE); \ } STMT_END -#define SAVEFREESHAREDPV(pv) \ - STMT_START { \ - SSCHECK(2); \ - SSPUSHPTR(pv); \ - SSPUSHINT(SAVEt_FREESHAREDPV); \ - } STMT_END - -/* Need to do the cop warnings like this, rather than SAVEFREESHAREDPV, +/* Need to do the cop warnings like this, rather than a "SAVEFREESHAREDPV", because realloc() means that the value can actually change. Possibly 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 SAVECOPWARNINGS(c) \ +#define SAVECOMPILEWARNINGS() \ STMT_START { \ - SSCHECK(3); \ - SSPUSHPTR((c)->cop_warnings); \ - SSPUSHPTR(c); \ - SSPUSHINT(SAVEt_COP_WARNINGS); \ + SSCHECK(2); \ + SSPUSHPTR(PL_compiling.cop_warnings); \ + SSPUSHINT(SAVEt_COMPILE_WARNINGS); \ } STMT_END #ifdef USE_ITHREADS