summaryrefslogtreecommitdiff
path: root/gv.c
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 /gv.c
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 'gv.c')
-rw-r--r--gv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gv.c b/gv.c
index c274065448..116d391148 100644
--- a/gv.c
+++ b/gv.c
@@ -59,11 +59,7 @@ Perl_gv_add_by_type(pTHX_ GV *gv, svtype type)
* if it walks like a dirhandle, then let's assume that
* this is a dirhandle.
*/
- what = PL_op->op_type == OP_READDIR ||
- PL_op->op_type == OP_TELLDIR ||
- PL_op->op_type == OP_SEEKDIR ||
- PL_op->op_type == OP_REWINDDIR ||
- PL_op->op_type == OP_CLOSEDIR ?
+ what = OP_IS_DIRHOP(PL_op->op_type) ?
"dirhandle" : "filehandle";
/* diag_listed_as: Bad symbol for filehandle */
} else if (type == SVt_PVHV) {