diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-19 12:27:03 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-19 12:27:03 -0700 |
commit | e4a1664ff161f51630de661b5ab408a4da33e016 (patch) | |
tree | 5acbf2f8431eb6ad29aa0cd1c2f956759051c859 | |
parent | cc131e4093efdc1b0a2095af14f2e1f692f7ac2e (diff) | |
download | perl-e4a1664ff161f51630de661b5ab408a4da33e016.tar.gz |
pp.c:pp_rv2gv: Skip amagic check when vivifying a glob
Commit bb1bc619 eliminated the only case that ‘goto wasref’ is called
with something that might have overloading. The only ‘goto wasref’
that remains is the autovivifying case, which cannot have any magic
(since the GV has just been created). So the wasref label can be
moved below the amagic check.
Consider this a picoöptimisation.
-rw-r--r-- | pp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -147,11 +147,11 @@ PP(pp_rv2gv) if (!isGV(sv) || SvFAKE(sv)) SvGETMAGIC(sv); if (SvROK(sv)) { - wasref: if (SvAMAGIC(sv)) { sv = amagic_deref_call(sv, to_gv_amg); SPAGAIN; } + wasref: sv = SvRV(sv); if (SvTYPE(sv) == SVt_PVIO) { GV * const gv = MUTABLE_GV(sv_newmortal()); |