summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-19 12:27:03 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-19 12:27:03 -0700
commite4a1664ff161f51630de661b5ab408a4da33e016 (patch)
tree5acbf2f8431eb6ad29aa0cd1c2f956759051c859
parentcc131e4093efdc1b0a2095af14f2e1f692f7ac2e (diff)
downloadperl-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 7bf6d6eda2..2722d0f5d7 100644
--- a/pp.c
+++ b/pp.c
@@ -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());