diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 18:50:40 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-08 18:50:40 +0000 |
commit | 350de78d9c02710bb008e9ca922c78ba251ec366 (patch) | |
tree | 6d721d7c176e73d19432c7bee8dc5f75d5572bda /op.h | |
parent | d18c61170a30691556a1da7413e13241a92f4e0a (diff) | |
download | perl-350de78d9c02710bb008e9ca922c78ba251ec366.tar.gz |
preliminary support for GVOP indirection via pad
p4raw-id: //depot/perl@4539
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 95 |
1 files changed, 62 insertions, 33 deletions
@@ -258,39 +258,68 @@ 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)) +#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)) +#endif #define Nullop Null(OP*) |