X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=scope.h;h=3ac4a59d51045225da90c13090cfe8827298f262;hb=771c48746478d09364a137ddcf848a480cc787fe;hp=cc349f0f7c22957f73a2677ea1db343a5395ab0d;hpb=6224f72bf639f0ca7f774fe2738f2408b3e430ac;p=p5sagit%2Fp5-mst-13.2.git diff --git a/scope.h b/scope.h index cc349f0..3ac4a59 100644 --- a/scope.h +++ b/scope.h @@ -25,6 +25,7 @@ #define SAVEt_AELEM 24 #define SAVEt_HELEM 25 #define SAVEt_OP 26 +#define SAVEt_HINTS 27 #define SSCHECK(need) if (savestack_ix + need > savestack_max) savestack_grow() #define SSPUSHINT(i) (savestack[savestack_ix++].any_i32 = (I32)(i)) @@ -88,13 +89,27 @@ save_destructor(SOFT_CAST(void(*)_((void*)))(FUNC_NAME_TO_PTR(f)), \ SOFT_CAST(void*)(p)) #endif -#define SAVESTACK_POS() STMT_START { \ - SSCHECK(2); \ - SSPUSHINT(stack_sp - stack_base); \ - SSPUSHINT(SAVEt_STACK_POS); \ - } STMT_END + +#define SAVESTACK_POS() \ + STMT_START { \ + SSCHECK(2); \ + SSPUSHINT(stack_sp - stack_base); \ + SSPUSHINT(SAVEt_STACK_POS); \ + } STMT_END + #define SAVEOP() save_op() +#define SAVEHINTS() \ + STMT_START { \ + if (hints & HINT_LOCALIZE_HH) \ + save_hints(); \ + else { \ + SSCHECK(2); \ + SSPUSHINT(hints); \ + SSPUSHINT(SAVEt_HINTS); \ + } \ + } STMT_END + /* A jmpenv packages the state required to perform a proper non-local jump. * Note that there is a start_env initialized when perl starts, and top_env * points to this initially, so top_env should always be non-null.