diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2011-06-02 00:27:49 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-09 23:45:08 -0700 |
commit | 332c2eacbbe33d99076d34256aa32351d41421c9 (patch) | |
tree | eac1b630e6de565140755e6e61015e5ca63e03d5 /gv.c | |
parent | 2b420b633b59fecd2561eeec600f17160862175b (diff) | |
download | perl-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.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) { |