summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-06-03 06:26:18 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-06-03 09:17:14 -0700
commitd4ddbae879e579fbbe0d210eedbce72f752c3c68 (patch)
tree311f1ca844ff9ffcb7db4a5863953c2d610cd84e /op.h
parent3bdf583b182847cb5998e0240312d5adc2210b53 (diff)
downloadperl-d4ddbae879e579fbbe0d210eedbce72f752c3c68.tar.gz
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. */
Diffstat (limited to 'op.h')
-rw-r--r--op.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/op.h b/op.h
index ae6989acb8..5466e57e3d 100644
--- a/op.h
+++ b/op.h
@@ -203,10 +203,12 @@ Deprecated. Use C<GIMME_V> instead.
#define OPpENTERSUB_DB 16 /* Debug subroutine. */
#define OPpENTERSUB_HASTARG 32 /* Called from OP tree. */
#define OPpENTERSUB_NOMOD 64 /* Immune to op_lvalue() for :attrlist. */
- /* OP_ENTERSUB and OP_RV2CV only */
+#define OPpENTERSUB_INARGS 4 /* Lval used as arg to a sub. */
+ /* 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. */
+#define OPpMAY_RETURN_CONSTANT 1 /* If a constant sub, return the constant */
+
/* OP_GV only */
#define OPpEARLY_CV 32 /* foo() called before sub foo was parsed */
/* OP_?ELEM only */
@@ -224,9 +226,6 @@ Deprecated. Use C<GIMME_V> instead.
/* (Therefore will return whatever is currently in the symbol table, not
guaranteed to be a PVGV) */
- /* OP_RV2CV only */
-#define OPpMAY_RETURN_CONSTANT 1 /* If a constant sub, return the constant */
-
/* Private for OPs with TARGLEX */
/* (lower bits may carry MAXARG) */
#define OPpTARGET_MY 16 /* Target is PADMY. */