diff options
-rw-r--r-- | embed.h | 4 | ||||
-rwxr-xr-x | embed.pl | 1 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | objXSUB.h | 4 | ||||
-rw-r--r-- | perlapi.c | 7 | ||||
-rw-r--r-- | proto.h | 1 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | regexec.c | 4 | ||||
-rw-r--r-- | scope.c | 14 | ||||
-rw-r--r-- | scope.h | 2 | ||||
-rw-r--r-- | sv.c | 6 |
11 files changed, 38 insertions, 8 deletions
@@ -561,6 +561,7 @@ #define save_hptr Perl_save_hptr #define save_I16 Perl_save_I16 #define save_I32 Perl_save_I32 +#define save_I8 Perl_save_I8 #define save_int Perl_save_int #define save_item Perl_save_item #define save_iv Perl_save_iv @@ -1957,6 +1958,7 @@ #define save_hptr(a) Perl_save_hptr(aTHX_ a) #define save_I16(a) Perl_save_I16(aTHX_ a) #define save_I32(a) Perl_save_I32(aTHX_ a) +#define save_I8(a) Perl_save_I8(aTHX_ a) #define save_int(a) Perl_save_int(aTHX_ a) #define save_item(a) Perl_save_item(aTHX_ a) #define save_iv(a) Perl_save_iv(aTHX_ a) @@ -3834,6 +3836,8 @@ #define save_I16 Perl_save_I16 #define Perl_save_I32 CPerlObj::Perl_save_I32 #define save_I32 Perl_save_I32 +#define Perl_save_I8 CPerlObj::Perl_save_I8 +#define save_I8 Perl_save_I8 #define Perl_save_int CPerlObj::Perl_save_int #define save_int Perl_save_int #define Perl_save_item CPerlObj::Perl_save_item @@ -1606,6 +1606,7 @@ p |void |save_hints p |void |save_hptr |HV** hptr p |void |save_I16 |I16* intp p |void |save_I32 |I32* intp +p |void |save_I8 |I8* bytep p |void |save_int |int* intp p |void |save_item |SV* item p |void |save_iv |IV* iv diff --git a/global.sym b/global.sym index 1eca0c1a9c..2cb0e118ad 100644 --- a/global.sym +++ b/global.sym @@ -479,6 +479,7 @@ Perl_save_hints Perl_save_hptr Perl_save_I16 Perl_save_I32 +Perl_save_I8 Perl_save_int Perl_save_item Perl_save_iv @@ -2727,6 +2727,10 @@ #define Perl_save_I32 pPerl->Perl_save_I32 #undef save_I32 #define save_I32 Perl_save_I32 +#undef Perl_save_I8 +#define Perl_save_I8 pPerl->Perl_save_I8 +#undef save_I8 +#define save_I8 Perl_save_I8 #undef Perl_save_int #define Perl_save_int pPerl->Perl_save_int #undef save_int @@ -3441,6 +3441,13 @@ Perl_save_I32(pTHXo_ I32* intp) ((CPerlObj*)pPerl)->Perl_save_I32(intp); } +#undef Perl_save_I8 +void +Perl_save_I8(pTHXo_ I8* bytep) +{ + ((CPerlObj*)pPerl)->Perl_save_I8(bytep); +} + #undef Perl_save_int void Perl_save_int(pTHXo_ int* intp) @@ -559,6 +559,7 @@ PERL_CALLCONV void Perl_save_hints(pTHX); PERL_CALLCONV void Perl_save_hptr(pTHX_ HV** hptr); PERL_CALLCONV void Perl_save_I16(pTHX_ I16* intp); PERL_CALLCONV void Perl_save_I32(pTHX_ I32* intp); +PERL_CALLCONV void Perl_save_I8(pTHX_ I8* bytep); PERL_CALLCONV void Perl_save_int(pTHX_ int* intp); PERL_CALLCONV void Perl_save_item(pTHX_ SV* item); PERL_CALLCONV void Perl_save_iv(pTHX_ IV* iv); @@ -3518,7 +3518,7 @@ Perl_save_re_context(pTHX) SAVEVPTR(PL_regendp); /* Ditto for endp. */ SAVEVPTR(PL_reglastparen); /* Similarly for lastparen. */ SAVEPPTR(PL_regtill); /* How far we are required to go. */ - SAVEI32(PL_regprev); /* char before regbol, \n if none */ + SAVEI8(PL_regprev); /* char before regbol, \n if none */ SAVEVPTR(PL_reg_start_tmp); /* from regexec.c */ PL_reg_start_tmp = 0; SAVEFREEPV(PL_reg_start_tmp); @@ -1632,12 +1632,12 @@ S_regtry(pTHX_ regexp *prog, char *startpos) PerlIO_printf(Perl_debug_log, " setting stack tmpbase at %"IVdf"\n", (IV)(PL_stack_sp - PL_stack_base)); )); - SAVEINT(cxstack[cxstack_ix].blk_oldsp); + SAVEI32(cxstack[cxstack_ix].blk_oldsp); cxstack[cxstack_ix].blk_oldsp = PL_stack_sp - PL_stack_base; /* Otherwise OP_NEXTSTATE will free whatever on stack now. */ SAVETMPS; /* Apparently this is not needed, judging by wantarray. */ - /* SAVEINT(cxstack[cxstack_ix].blk_gimme); + /* SAVEI8(cxstack[cxstack_ix].blk_gimme); cxstack[cxstack_ix].blk_gimme = G_SCALAR; */ if (PL_reg_sv) { @@ -405,6 +405,16 @@ Perl_save_I16(pTHX_ I16 *intp) } void +Perl_save_I8(pTHX_ I8 *bytep) +{ + dTHR; + SSCHECK(3); + SSPUSHINT(*bytep); + SSPUSHPTR(bytep); + SSPUSHINT(SAVEt_I8); +} + +void Perl_save_iv(pTHX_ IV *ivp) { dTHR; @@ -751,6 +761,10 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; *(I16*)ptr = (I16)SSPOPINT; break; + case SAVEt_I8: /* I8 reference */ + ptr = SSPOPPTR; + *(I8*)ptr = (I8)SSPOPINT; + break; case SAVEt_IV: /* IV reference */ ptr = SSPOPPTR; *(IV*)ptr = (IV)SSPOPIV; @@ -30,6 +30,7 @@ #define SAVEt_GENERIC_SVREF 29 #define SAVEt_DESTRUCTOR_X 30 #define SAVEt_VPTR 31 +#define SAVEt_I8 32 #define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow() #define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) @@ -71,6 +72,7 @@ * Not using SOFT_CAST on SAVESPTR, SAVEGENERICSV and SAVEFREESV * because these are used for several kinds of pointer values */ +#define SAVEI8(i) save_I8(SOFT_CAST(I8*)&(i)) #define SAVEI16(i) save_I16(SOFT_CAST(I16*)&(i)) #define SAVEI32(i) save_I32(SOFT_CAST(I32*)&(i)) #define SAVEINT(i) save_int(SOFT_CAST(int*)&(i)) @@ -6379,12 +6379,8 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl) TOPLONG(nss,ix) = longval; break; case SAVEt_I32: /* I32 reference */ - ptr = POPPTR(ss,ix); - TOPPTR(nss,ix) = any_dup(ptr, proto_perl); - i = POPINT(ss,ix); - TOPINT(nss,ix) = i; - break; case SAVEt_I16: /* I16 reference */ + case SAVEt_I8: /* I8 reference */ ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = any_dup(ptr, proto_perl); i = POPINT(ss,ix); |