#define ptable_map_store(T, K, V) ptable_map_store(aPTBLMS_ (T), (K), (V))
#define ptable_map_delete(T, K) ptable_map_delete(aPTBLMS_ (T), (K))
-STATIC ptable *lt_op_map = NULL;
-
#ifdef USE_ITHREADS
STATIC perl_mutex lt_op_map_mutex;
#endif /* !USE_ITHREADS */
+STATIC ptable *lt_op_padxv_map = NULL;
+
typedef struct {
+ OP *(*old_pp)(pTHX);
#ifdef MULTIPLICITY
STRLEN buf_size, orig_pkg_len, type_pkg_len, type_meth_len;
char *buf;
SV *type_pkg;
SV *type_meth;
#endif /* !MULTIPLICITY */
- OP *(*old_pp)(pTHX);
-} lt_op_info;
+} lt_op_padxv_info;
-STATIC void lt_op_info_call(pTHX_ const lt_op_info *oi, SV *sv) {
-#define lt_op_info_call(O, S) lt_op_info_call(aTHX_ (O), (S))
+STATIC void lt_op_padxv_info_call(pTHX_ const lt_op_padxv_info *oi, SV *sv) {
+#define lt_op_padxv_info_call(O, S) lt_op_padxv_info_call(aTHX_ (O), (S))
SV *orig_pkg, *type_pkg, *type_meth;
int items;
dSP;
return;
}
-STATIC void lt_map_store(pTHX_ const OP *o, SV *orig_pkg, SV *type_pkg, SV *type_meth, OP *(*old_pp)(pTHX)) {
-#define lt_map_store(O, OP, TP, TM, PP) lt_map_store(aTHX_ (O), (OP), (TP), (TM), (PP))
- lt_op_info *oi;
+STATIC void lt_padxv_map_store(pTHX_ const OP *o, SV *orig_pkg, SV *type_pkg, SV *type_meth, OP *(*old_pp)(pTHX)) {
+#define lt_padxv_map_store(O, OP, TP, TM, PP) lt_padxv_map_store(aTHX_ (O), (OP), (TP), (TM), (PP))
+ lt_op_padxv_info *oi;
LT_LOCK(<_op_map_mutex);
- if (!(oi = ptable_fetch(lt_op_map, o))) {
+ if (!(oi = ptable_fetch(lt_op_padxv_map, o))) {
oi = PerlMemShared_malloc(sizeof *oi);
- ptable_map_store(lt_op_map, o, oi);
+ ptable_map_store(lt_op_padxv_map, o, oi);
#ifdef MULTIPLICITY
oi->buf = NULL;
oi->buf_size = 0;
LT_UNLOCK(<_op_map_mutex);
}
-STATIC const lt_op_info *lt_map_fetch(const OP *o, lt_op_info *oi) {
- const lt_op_info *val;
+STATIC const lt_op_padxv_info *lt_padxv_map_fetch(const OP *o, lt_op_padxv_info *oi) {
+ const lt_op_padxv_info *val;
LT_LOCK(<_op_map_mutex);
- val = ptable_fetch(lt_op_map, o);
+ val = ptable_fetch(lt_op_padxv_map, o);
if (val) {
*oi = *val;
val = oi;
#define lt_map_delete(O) lt_map_delete(aTHX_ (O))
LT_LOCK(<_op_map_mutex);
- ptable_map_delete(lt_op_map, o);
+ ptable_map_delete(lt_op_padxv_map, o);
LT_UNLOCK(<_op_map_mutex);
}
/* ... Our pp_padsv ........................................................ */
STATIC OP *lt_pp_padsv(pTHX) {
- lt_op_info oi;
+ lt_op_padxv_info oi;
- if (lt_map_fetch(PL_op, &oi)) {
+ if (lt_padxv_map_fetch(PL_op, &oi)) {
dTARGET;
- lt_op_info_call(&oi, TARG);
+ lt_op_padxv_info_call(&oi, TARG);
return oi.old_pp(aTHX);
}
SvREFCNT_inc_simple_void_NN(orig_meth);
}
- lt_map_store(o, orig_pkg, type_pkg, type_meth, o->op_ppaddr);
+ lt_padxv_map_store(o, orig_pkg, type_pkg, type_meth, o->op_ppaddr);
} else {
skip:
lt_map_delete(o);
STATIC void lt_peep_rec(pTHX_ OP *o, ptable *seen) {
#define lt_peep_rec(O) lt_peep_rec(aTHX_ (O), seen)
for (; o; o = o->op_next) {
- lt_op_info *oi = NULL;
-
if (ptable_fetch(seen, o))
break;
ptable_seen_store(seen, o, o);
switch (o->op_type) {
case OP_PADSV:
if (o->op_ppaddr != lt_pp_padsv && o->op_private & OPpLVAL_INTRO) {
+ lt_op_padxv_info *oi;
LT_LOCK(<_op_map_mutex);
- oi = ptable_fetch(lt_op_map, o);
+ oi = ptable_fetch(lt_op_padxv_map, o);
if (oi) {
oi->old_pp = o->op_ppaddr;
o->op_ppaddr = lt_pp_padsv;
if (!lt_booted++) {
HV *stash;
- lt_op_map = ptable_new();
+ lt_op_padxv_map = ptable_new();
#ifdef USE_ITHREADS
MUTEX_INIT(<_op_map_mutex);
#endif