diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-07-21 07:05:47 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-07-26 07:06:00 +0000 |
commit | 0cdaae3e56c7eb2fab73f258cf564fe0d6d1b083 (patch) | |
tree | a0bedbe0b9e955c48ed45d9d4584cce889eacca1 /gv.c | |
parent | bd4f91e548cd03e60692e013e23c0fff31ead346 (diff) | |
download | perl-0cdaae3e56c7eb2fab73f258cf564fe0d6d1b083.tar.gz |
In Perl_gv_check() set and clear HvAUXf_SCAN_STASH just once.
Previously the flag bit was set and cleared for each iteration of the outer
loop. The compiler *might* have made this optimisation that this commit makes
for us, but might not.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2652,10 +2652,10 @@ Perl_gv_check(pTHX_ HV *stash) assert(HvARRAY(stash)); + /* mark stash is being scanned, to avoid recursing */ + HvAUX(stash)->xhv_aux_flags |= HvAUXf_SCAN_STASH; for (i = 0; i <= (I32) HvMAX(stash); i++) { const HE *entry; - /* mark stash is being scanned, to avoid recursing */ - HvAUX(stash)->xhv_aux_flags |= HvAUXf_SCAN_STASH; for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { GV *gv; HV *hv; @@ -2696,8 +2696,8 @@ Perl_gv_check(pTHX_ HV *stash) HEKfARG(GvNAME_HEK(gv))); } } - HvAUX(stash)->xhv_aux_flags &= ~HvAUXf_SCAN_STASH; } + HvAUX(stash)->xhv_aux_flags &= ~HvAUXf_SCAN_STASH; } GV * |