summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-11-11 19:48:21 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-11 19:48:21 +0000
commit8a12f161a3a8b8cc9c866a9f342b9476fb0b9b95 (patch)
treef7d97a5034e7bcae78537a54f77a0067f572f6aa /op.h
parent887d29384f0bc4b6197573ce19ff42abfe67fa51 (diff)
parent11faa288e292c27cb2ddc4ccdc483b523d26ce19 (diff)
downloadperl-8a12f161a3a8b8cc9c866a9f342b9476fb0b9b95.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@4549
Diffstat (limited to 'op.h')
-rw-r--r--op.h97
1 files changed, 64 insertions, 33 deletions
diff --git a/op.h b/op.h
index c1ce70b5a7..95ecf87ecc 100644
--- a/op.h
+++ b/op.h
@@ -259,39 +259,70 @@ struct loop {
OP * op_lastop;
};
-#define cUNOP ((UNOP*)PL_op)
-#define cBINOP ((BINOP*)PL_op)
-#define cLISTOP ((LISTOP*)PL_op)
-#define cLOGOP ((LOGOP*)PL_op)
-#define cPMOP ((PMOP*)PL_op)
-#define cSVOP ((SVOP*)PL_op)
-#define cPADOP ((PADOP*)PL_op)
-#define cPVOP ((PVOP*)PL_op)
-#define cCOP ((COP*)PL_op)
-#define cLOOP ((LOOP*)PL_op)
-
-#define cUNOPo ((UNOP*)o)
-#define cBINOPo ((BINOP*)o)
-#define cLISTOPo ((LISTOP*)o)
-#define cLOGOPo ((LOGOP*)o)
-#define cPMOPo ((PMOP*)o)
-#define cSVOPo ((SVOP*)o)
-#define cPADOPo ((PADOP*)o)
-#define cPVOPo ((PVOP*)o)
-#define cCVOPo ((CVOP*)o)
-#define cCOPo ((COP*)o)
-#define cLOOPo ((LOOP*)o)
-
-#define kUNOP ((UNOP*)kid)
-#define kBINOP ((BINOP*)kid)
-#define kLISTOP ((LISTOP*)kid)
-#define kLOGOP ((LOGOP*)kid)
-#define kPMOP ((PMOP*)kid)
-#define kSVOP ((SVOP*)kid)
-#define kPADOP ((PADOP*)kid)
-#define kPVOP ((PVOP*)kid)
-#define kCOP ((COP*)kid)
-#define kLOOP ((LOOP*)kid)
+#define cUNOPx(o) ((UNOP*)o)
+#define cBINOPx(o) ((BINOP*)o)
+#define cLISTOPx(o) ((LISTOP*)o)
+#define cLOGOPx(o) ((LOGOP*)o)
+#define cPMOPx(o) ((PMOP*)o)
+#define cSVOPx(o) ((SVOP*)o)
+#define cPADOPx(o) ((PADOP*)o)
+#define cPVOPx(o) ((PVOP*)o)
+#define cCOPx(o) ((COP*)o)
+#define cLOOPx(o) ((LOOP*)o)
+
+#define cUNOP cUNOPx(PL_op)
+#define cBINOP cBINOPx(PL_op)
+#define cLISTOP cLISTOPx(PL_op)
+#define cLOGOP cLOGOPx(PL_op)
+#define cPMOP cPMOPx(PL_op)
+#define cSVOP cSVOPx(PL_op)
+#define cPADOP cPADOPx(PL_op)
+#define cPVOP cPVOPx(PL_op)
+#define cCOP cCOPx(PL_op)
+#define cLOOP cLOOPx(PL_op)
+
+#define cUNOPo cUNOPx(o)
+#define cBINOPo cBINOPx(o)
+#define cLISTOPo cLISTOPx(o)
+#define cLOGOPo cLOGOPx(o)
+#define cPMOPo cPMOPx(o)
+#define cSVOPo cSVOPx(o)
+#define cPADOPo cPADOPx(o)
+#define cPVOPo cPVOPx(o)
+#define cCOPo cCOPx(o)
+#define cLOOPo cLOOPx(o)
+
+#define kUNOP cUNOPx(kid)
+#define kBINOP cBINOPx(kid)
+#define kLISTOP cLISTOPx(kid)
+#define kLOGOP cLOGOPx(kid)
+#define kPMOP cPMOPx(kid)
+#define kSVOP cSVOPx(kid)
+#define kPADOP cPADOPx(kid)
+#define kPVOP cPVOPx(kid)
+#define kCOP cCOPx(kid)
+#define kLOOP cLOOPx(kid)
+
+
+#ifdef USE_ITHREADS
+# define cGVOPx(o) ((GV*)PAD_SV(cPADOPx(o)->op_padix))
+# define cGVOP ((GV*)PAD_SV(cPADOP->op_padix))
+# define cGVOPo ((GV*)PAD_SV(cPADOPo->op_padix))
+# define kGVOP ((GV*)PAD_SV(kPADOP->op_padix))
+# define cGVOP_set(v) (PL_curpad[cPADOP->op_padix] = (SV*)(v))
+# define cGVOPo_set(v) (PL_curpad[cPADOPo->op_padix] = (SV*)(v))
+# define kGVOP_set(v) (PL_curpad[kPADOP->op_padix] = (SV*)(v))
+# define IS_PADGV(v) (v && SvTYPE(v) == SVt_PVGV && GvIN_PAD(v))
+#else
+# define cGVOPx(o) ((GV*)cSVOPx(o)->op_sv)
+# define cGVOP ((GV*)cSVOP->op_sv)
+# define cGVOPo ((GV*)cSVOPo->op_sv)
+# define kGVOP ((GV*)kSVOP->op_sv)
+# define cGVOP_set(v) (cPADOP->op_sv = (SV*)(v))
+# define cGVOPo_set(v) (cPADOPo->op_sv = (SV*)(v))
+# define kGVOP_set(v) (kPADOP->op_sv = (SV*)(v))
+# define IS_PADGV(v) FALSE
+#endif
#define Nullop Null(OP*)