typedef PERL_BITFIELD16 Optype;
-/* this field now either points to the next sibling or to the parent,
- * depending on op_moresib. So rename it from op_sibling to op_sibparent.
- */
-#ifdef PERL_OP_PARENT
-# define _OP_SIBPARENT_FIELDNAME op_sibparent
-#else
-# define _OP_SIBPARENT_FIELDNAME op_sibling
-#endif
-
#ifdef BASEOP_DEFINITION
#define BASEOP BASEOP_DEFINITION
#else
#define BASEOP \
OP* op_next; \
- OP* _OP_SIBPARENT_FIELDNAME;\
+ OP* op_sibparent; \
OP* (*op_ppaddr)(pTHX); \
PADOFFSET op_targ; \
PERL_BITFIELD16 op_type:9; \
#define OPf_REF 16 /* Certified reference. */
/* (Return container, not containee). */
#define OPf_MOD 32 /* Will modify (lvalue). */
+
#define OPf_STACKED 64 /* Some arg is arriving on the stack. */
+ /* Indicates mutator-variant of op for those
+ * ops which support them, e.g. $x += 1
+ */
+
#define OPf_SPECIAL 128 /* Do something weird for this op: */
/* On local LVAL, don't init local value. */
/* On OP_SORT, subroutine is inlined. */
SV *sv;
IV iv;
UV uv;
+ char *pv;
+ SSize_t ssize;
} UNOP_AUX_item;
#ifdef USE_ITHREADS
# define cMETHOPx_rclass(v) (cMETHOPx(v)->op_rclass_sv)
#endif
-# define cMETHOPx_meth(v) cSVOPx_sv(v)
+#define cMETHOPx_meth(v) cSVOPx_sv(v)
#define cGVOP_gv cGVOPx_gv(PL_op)
#define cGVOPo_gv cGVOPx_gv(o)
#define ref(o, type) doref(o, type, TRUE)
#endif
+
+/* translation table attached to OP_TRANS/OP_TRANSR ops */
+
+typedef struct {
+ Size_t size; /* number of entries in map[], not including final slot */
+ short map[1]; /* Unwarranted chumminess */
+} OPtrans_map;
+
+
/*
=head1 Optree Manipulation Functions
C<L</op_sibling_splice>>.
=for apidoc Am|void|OpLASTSIB_set|OP *o|OP *parent
-Marks C<o> as having no further siblings. On C<PERL_OP_PARENT> builds, marks
+Marks C<o> as having no further siblings and marks
o as having the specified parent. See also C<L</OpMORESIB_set>> and
C<OpMAYBESIB_set>. For a higher-level interface, see
C<L</op_sibling_splice>>.
#define OP_TYPE_ISNT_AND_WASNT(o, type) \
( (o) && OP_TYPE_ISNT_AND_WASNT_NN(o, type) )
+/* should match anything that uses ck_ftst in regen/opcodes */
+#define OP_IS_STAT(op) (OP_IS_FILETEST(op) || (op) == OP_LSTAT || (op) == OP_STAT)
-#ifdef PERL_OP_PARENT
# define OpHAS_SIBLING(o) (cBOOL((o)->op_moresib))
# define OpSIBLING(o) (0 + (o)->op_moresib ? (o)->op_sibparent : NULL)
# define OpMORESIB_set(o, sib) ((o)->op_moresib = 1, (o)->op_sibparent = (sib))
((o)->op_moresib = 0, (o)->op_sibparent = (parent))
# define OpMAYBESIB_set(o, sib, parent) \
((o)->op_sibparent = ((o)->op_moresib = cBOOL(sib)) ? (sib) : (parent))
-#else
-# define OpHAS_SIBLING(o) (cBOOL((o)->op_sibling))
-# define OpSIBLING(o) (0 + (o)->op_sibling)
-# define OpMORESIB_set(o, sib) ((o)->op_moresib = 1, (o)->op_sibling = (sib))
-# define OpLASTSIB_set(o, parent) \
- ((o)->op_moresib = 0, (o)->op_sibling = NULL)
-# define OpMAYBESIB_set(o, sib, parent) \
- ((o)->op_moresib = cBOOL(sib), (o)->op_sibling = (sib))
-#endif
#if !defined(PERL_CORE) && !defined(PERL_EXT)
/* for backwards compatibility only */
#define MDEREF_SHIFT 7
#if defined(PERL_IN_DOOP_C) || defined(PERL_IN_PP_C)
-static const char * const deprecated_above_ff_msg
- = "Use of strings with code points over 0xFF as arguments to "
- "%s operator is deprecated. This will be a fatal error in "
- "Perl 5.28";
+# define FATAL_ABOVE_FF_MSG \
+ "Use of strings with code points over 0xFF as arguments to " \
+ "%s operator is not allowed"
+# define DEPRECATED_ABOVE_FF_MSG \
+ "Use of strings with code points over 0xFF as arguments to " \
+ "%s operator is deprecated. This will be a fatal error in " \
+ "Perl 5.32"
#endif