summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-08-21 20:16:48 +0100
committerDavid Mitchell <davem@iabyn.com>2014-09-10 14:25:05 +0100
commit738ec38010d319318456d2882cb13e00547853de (patch)
tree14e2f32b72c7d0e7fab94a65c8fbe62dc7290f9f /op.h
parent1be0d08e5a9c1e6d52d56197d3bdcc2b919a8933 (diff)
downloadperl-738ec38010d319318456d2882cb13e00547853de.tar.gz
better document OA_ flags
Its a bit confusing which bits in PL_opargs are used for what, and which flags in regen/opcodes map to which OA_* value
Diffstat (limited to 'op.h')
-rw-r--r--op.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/op.h b/op.h
index 1b247ce33b..0486548c99 100644
--- a/op.h
+++ b/op.h
@@ -617,7 +617,7 @@ struct loop {
#define OA_DANGEROUS 64
#define OA_DEFGV 128
-/* The next 4 bits encode op class information */
+/* The next 4 bits (8..11) encode op class information */
#define OCSHIFT 8
#define OA_CLASS_MASK (15 << OCSHIFT)
@@ -637,9 +637,10 @@ struct loop {
#define OA_FILESTATOP (12 << OCSHIFT)
#define OA_LOOPEXOP (13 << OCSHIFT)
+/* Each remaining nybble of PL_opargs (i.e. bits 12..15, 16..19 etc)
+ * encode the type for each arg */
#define OASHIFT 12
-/* Remaining nybbles of PL_opargs */
#define OA_SCALAR 1
#define OA_LIST 2
#define OA_AVREF 3