#define apply_attrs_my S_apply_attrs_my
# if defined(PL_OP_SLAB_ALLOC)
#define Slab_Alloc S_Slab_Alloc
+#define Slab_Free S_Slab_Free
# endif
#endif
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
#define apply_attrs_my(a,b,c,d) S_apply_attrs_my(aTHX_ a,b,c,d)
# if defined(PL_OP_SLAB_ALLOC)
#define Slab_Alloc(a,b) S_Slab_Alloc(aTHX_ a,b)
+#define Slab_Free(a) S_Slab_Free(aTHX_ a)
# endif
#endif
#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
#define PL_Mem (PERL_GET_INTERP->IMem)
#define PL_MemParse (PERL_GET_INTERP->IMemParse)
#define PL_MemShared (PERL_GET_INTERP->IMemShared)
+#define PL_OpPtr (PERL_GET_INTERP->IOpPtr)
+#define PL_OpSlab (PERL_GET_INTERP->IOpSlab)
+#define PL_OpSpace (PERL_GET_INTERP->IOpSpace)
#define PL_Proc (PERL_GET_INTERP->IProc)
#define PL_Sock (PERL_GET_INTERP->ISock)
#define PL_StdIO (PERL_GET_INTERP->IStdIO)
#define PL_Mem (vTHX->IMem)
#define PL_MemParse (vTHX->IMemParse)
#define PL_MemShared (vTHX->IMemShared)
+#define PL_OpPtr (vTHX->IOpPtr)
+#define PL_OpSlab (vTHX->IOpSlab)
+#define PL_OpSpace (vTHX->IOpSpace)
#define PL_Proc (vTHX->IProc)
#define PL_Sock (vTHX->ISock)
#define PL_StdIO (vTHX->IStdIO)
#define PL_IMem PL_Mem
#define PL_IMemParse PL_MemParse
#define PL_IMemShared PL_MemShared
+#define PL_IOpPtr PL_OpPtr
+#define PL_IOpSlab PL_OpSlab
+#define PL_IOpSpace PL_OpSpace
#define PL_IProc PL_Proc
#define PL_ISock PL_Sock
#define PL_IStdIO PL_StdIO
/* See L<perlguts/"The Perl API"> for detailed notes on
* PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
+#ifdef PERL_IMPLICIT_SYS
+/* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem
+ so use slab allocator to avoid lots of MUTEX overhead
+ */
+# ifndef PL_SLAB_ALLOC
+# define PL_SLAB_ALLOC
+# endif
+#endif
+
#ifdef USE_ITHREADS
# if !defined(MULTIPLICITY)
# define MULTIPLICITY
#define PL_MemParse (*Perl_IMemParse_ptr(aTHX))
#undef PL_MemShared
#define PL_MemShared (*Perl_IMemShared_ptr(aTHX))
+#undef PL_OpPtr
+#define PL_OpPtr (*Perl_IOpPtr_ptr(aTHX))
+#undef PL_OpSlab
+#define PL_OpSlab (*Perl_IOpSlab_ptr(aTHX))
+#undef PL_OpSpace
+#define PL_OpSpace (*Perl_IOpSpace_ptr(aTHX))
#undef PL_Proc
#define PL_Proc (*Perl_IProc_ptr(aTHX))
#undef PL_Sock
STATIC void S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp);
# if defined(PL_OP_SLAB_ALLOC)
STATIC void* S_Slab_Alloc(pTHX_ int m, size_t sz);
+STATIC void S_Slab_Free(pTHX_ void *);
# endif
#endif
STATIC I32 S_dopoptolabel(pTHX_ char *label);
STATIC I32 S_dopoptoloop(pTHX_ I32 startingblock);
STATIC I32 S_dopoptosub(pTHX_ I32 startingblock);
-STATIC I32 S_dopoptosub_at(pTHX_ PERL_CONTEXT* cxstk, I32 startingblock\r);
+STATIC I32 S_dopoptosub_at(pTHX_ PERL_CONTEXT* cxstk, I32 startingblock);
STATIC void S_save_lines(pTHX_ AV *array, SV *sv);
STATIC OP* S_doeval(pTHX_ int gimme, OP** startop);
STATIC PerlIO * S_doopen_pmc(pTHX_ const char *name, const char *mode);
bool bof = FALSE;
/* check if there's an identifier for us to look at */
- if (PL_pending_ident)
+ if (PL_pending_ident)
return S_pending_ident(aTHX);
/* no identifier pending identification */
(void)strcpy(d,"ARGV");
/* Check whether readline() is overriden */
- if ((gv_readline = gv_fetchpv("readline", FALSE, SVt_PVCV))
- && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline)
+ if (((gv_readline = gv_fetchpv("readline", FALSE, SVt_PVCV))
+ && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline))
||
- (gvp = (GV**)hv_fetch(PL_globalstash, "readline", 8, FALSE))
+ ((gvp = (GV**)hv_fetch(PL_globalstash, "readline", 8, FALSE))
&& (gv_readline = *gvp) != (GV*)&PL_sv_undef
- && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline))
+ && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline)))
readline_overriden = TRUE;
/* if <$fh>, create the ops to turn the variable into a