summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2011-08-11 21:41:20 +0200
committerFather Chrysostomos <sprout@cpan.org>2011-08-14 14:14:52 -0700
commit1dafeec867743902378a4358c38ba421af0df01a (patch)
tree83343da45c14412cb0f6458ac7495927567a480a /op.h
parent60d42009cb8c52016448d8dd8e95a2310dcf188a (diff)
downloadperl-1dafeec867743902378a4358c38ba421af0df01a.tar.gz
Improve comments about op_private bits. And move the non op specific flags to the top.
Diffstat (limited to 'op.h')
-rw-r--r--op.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/op.h b/op.h
index cbcac7de2e..873dc497e0 100644
--- a/op.h
+++ b/op.h
@@ -156,12 +156,19 @@ Deprecated. Use C<GIMME_V> instead.
: G_SCALAR) \
: dowantarray())
+/* Lower bits of op_private often carry the number of arguments, as
+ * set by newBINOP, newUNOP and ck_fun */
+
/* NOTE: OP_NEXTSTATE and OP_DBSTATE (i.e. COPs) carry lower
* bits of PL_hints in op_private */
/* Private for lvalues */
#define OPpLVAL_INTRO 128 /* Lvalue must be localized or lvalue sub */
+/* Private for OPs with TARGLEX */
+ /* (lower bits may carry MAXARG) */
+#define OPpTARGET_MY 16 /* Target is PADMY. */
+
/* Private for OP_LEAVE, OP_LEAVESUB, OP_LEAVESUBLV and OP_LEAVEWRITE */
#define OPpREFCOUNTED 64 /* op_targ carries a refcount */
@@ -203,6 +210,7 @@ Deprecated. Use C<GIMME_V> instead.
#define OPpENTERSUB_NOMOD 64 /* Immune to op_lvalue() for :attrlist. */
#define OPpENTERSUB_INARGS 4 /* Lval used as arg to a sub. */
#define OPpENTERSUB_DEREF 1 /* Lval call that autovivifies. */
+/* used by HINT_STRICT_SUBS 2 */
/* Mask for OP_ENTERSUB flags, the absence of which must be propagated
in dynamic context */
#define OPpENTERSUB_LVAL_MASK (OPpLVAL_INTRO|OPpENTERSUB_INARGS)
@@ -230,10 +238,6 @@ Deprecated. Use C<GIMME_V> instead.
/* (Therefore will return whatever is currently in the symbol table, not
guaranteed to be a PVGV) */
-/* Private for OPs with TARGLEX */
- /* (lower bits may carry MAXARG) */
-#define OPpTARGET_MY 16 /* Target is PADMY. */
-
/* Private for OP_ENTERITER and OP_ITER */
#define OPpITER_REVERSED 4 /* for (reverse ...) */
#define OPpITER_DEF 8 /* for $_ or for my $_ */