Rearrange some private op flag constants
authorFather Chrysostomos <sprout@cpan.org>
Fri, 3 Jun 2011 13:26:18 +0000 (06:26 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 3 Jun 2011 16:17:14 +0000 (09:17 -0700)
commitd4ddbae879e579fbbe0d210eedbce72f752c3c68
tree311f1ca844ff9ffcb7db4a5863953c2d610cd84e
parent3bdf583b182847cb5998e0240312d5adc2210b53
Rearrange some private op flag constants

Some constants in op.h were a bit muddled up and were not grouped
according to which ops used them. And one of the comments was wrong.
The history is a bit involved:

Commit 7a52d87 added this comment, which was correct:

+  /* OP_RV2CV only */
 #define OPpENTERSUB_AMPER 8 /* Used & form to call. */

Commit 9675f7a added this constant:

   /* OP_RV2CV only */
 #define OPpENTERSUB_AMPER 8 /* Used & form to call. */
+#define OPpENTERSUB_NOPAREN 128 /* bare sub call (without parens) */

Commit cd06dff added this one, which is confusing, as it is only used
on entersub:

   /* OP_RV2CV only */
 #define OPpENTERSUB_AMPER 8 /* Used & form to call. */
 #define OPpENTERSUB_NOPAREN 128 /* bare sub call (without parens) */
+#define OPpENTERSUB_INARGS 4 /* Lval used as arg to a sub. */

Commit e26df76 added this, resulting in there being two
OP_RV2CV sections:

+  /* OP_RV2CV only */
+#define OPpMAY_RETURN_CONSTANT 1 /* If a constant sub, return the constant */
+

To top it all, commit b900987 unfortunately ‘fixed’ a mislead-
ing comment:

-  /* OP_RV2CV only */
+  /* OP_ENTERSUB and OP_RV2CV only */
 #define OPpENTERSUB_AMPER 8 /* Used & form to call. */
 #define OPpENTERSUB_NOPAREN 128 /* bare sub call (without parens) */
 #define OPpENTERSUB_INARGS 4 /* Lval used as arg to a sub. */
op.h