summaryrefslogtreecommitdiff
path: root/opnames.h
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-06-02 00:27:49 -0600
committerFather Chrysostomos <sprout@cpan.org>2011-09-09 23:45:08 -0700
commit332c2eacbbe33d99076d34256aa32351d41421c9 (patch)
treeeac1b630e6de565140755e6e61015e5ca63e03d5 /opnames.h
parent2b420b633b59fecd2561eeec600f17160862175b (diff)
downloadperl-332c2eacbbe33d99076d34256aa32351d41421c9.tar.gz
regen/opcode.pl: generate OP_IS_DIRHOP, use in gv.c
Generate OP_IS_DIRHOP like other OP_IS_* macros, use in gv.c:Perl_gv_add_by_type(). Modifies 'F' operand type to 'DF'. This yields a micro-optimization.
Diffstat (limited to 'opnames.h')
-rw-r--r--opnames.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/opnames.h b/opnames.h
index b55cda2b2d..26dfbaaac7 100644
--- a/opnames.h
+++ b/opnames.h
@@ -391,9 +391,10 @@ typedef enum opcode {
#define MAXO 372
-/* the OP_IS_(SOCKET|FILETEST) macros are optimized to a simple range
- check because all the member OPs are contiguous in opcode.pl
- <OPS> table. opcode.pl verifies the range contiguity. */
+/* the OP_IS_* macros are optimized to a simple range check because
+ all the member OPs are contiguous in regen/opcodes table.
+ opcode.pl verifies the range contiguity, or generates an OR-equals
+ expression */
#define OP_IS_SOCKET(op) \
((op) >= OP_SEND && (op) <= OP_GETPEERNAME)
@@ -407,4 +408,7 @@ typedef enum opcode {
#define OP_IS_NUMCOMPARE(op) \
((op) >= OP_LT && (op) <= OP_I_NCMP)
+#define OP_IS_DIRHOP(op) \
+ ((op) >= OP_READDIR && (op) <= OP_CLOSEDIR)
+
/* ex: set ro: */