Improve comments about op_private bits. And move the non op specific flags to the...
authorGerard Goossen <gerard@ggoossen.net>
Thu, 11 Aug 2011 19:41:20 +0000 (21:41 +0200)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 14 Aug 2011 21:14:52 +0000 (14:14 -0700)
op.h

diff --git a/op.h b/op.h
index cbcac7d..873dc49 100644 (file)
--- 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 $_ */