diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-02-20 12:21:52 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-01 14:01:41 +0100 |
commit | c6bf6a65e4bf512beae58d59446046f4ca20372f (patch) | |
tree | 1c57f74df902dcff874fbc60c8649788ad6919ce /scope.h | |
parent | 620d5b66847dea9c84e6d8017fd953345ed9af51 (diff) | |
download | perl-c6bf6a65e4bf512beae58d59446046f4ca20372f.tar.gz |
On the save stack, store the save type as the bottom 6 bits of a UV.
This makes the other 26 (or 58) bits available for save data.
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -59,6 +59,9 @@ #define SAVEf_SETMAGIC 1 #define SAVEf_KEEPOLDELEM 2 +#define SAVE_TIGHT_SHIFT 6 +#define SAVE_MASK 0x3F + #define save_aelem(av,idx,sptr) save_aelem_flags(av,idx,sptr,SAVEf_SETMAGIC) #define save_helem(hv,key,sptr) save_helem_flags(hv,key,sptr,SAVEf_SETMAGIC) @@ -72,6 +75,7 @@ #define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i)) #define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p)) #define SSPUSHIV(i) (PL_savestack[PL_savestack_ix++].any_iv = (IV)(i)) +#define SSPUSHUV(u) (PL_savestack[PL_savestack_ix++].any_uv = (UV)(u)) #define SSPUSHPTR(p) (PL_savestack[PL_savestack_ix++].any_ptr = (void*)(p)) #define SSPUSHDPTR(p) (PL_savestack[PL_savestack_ix++].any_dptr = (p)) #define SSPUSHDXPTR(p) (PL_savestack[PL_savestack_ix++].any_dxptr = (p)) @@ -79,6 +83,7 @@ #define SSPOPLONG (PL_savestack[--PL_savestack_ix].any_long) #define SSPOPBOOL (PL_savestack[--PL_savestack_ix].any_bool) #define SSPOPIV (PL_savestack[--PL_savestack_ix].any_iv) +#define SSPOPUV (PL_savestack[--PL_savestack_ix].any_uv) #define SSPOPPTR (PL_savestack[--PL_savestack_ix].any_ptr) #define SSPOPDPTR (PL_savestack[--PL_savestack_ix].any_dptr) #define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr) @@ -192,7 +197,7 @@ scope has the given name. Name must be a literal string. STMT_START { \ SSCHECK(2); \ SSPUSHINT(PL_stack_sp - PL_stack_base); \ - SSPUSHINT(SAVEt_STACK_POS); \ + SSPUSHUV(SAVEt_STACK_POS); \ } STMT_END #define SAVEOP() save_op() @@ -222,7 +227,7 @@ scope has the given name. Name must be a literal string. SSCHECK(3); \ SSPUSHINT(cxstack[cxstack_ix].blk_oldsp); \ SSPUSHINT(cxstack_ix); \ - SSPUSHINT(SAVEt_STACK_CXPOS); \ + SSPUSHUV(SAVEt_STACK_CXPOS); \ } STMT_END #define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) |