diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-28 06:34:48 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-28 21:03:52 -0700 |
commit | f3ab9a22e0ff7bcf690cebd72982bbf2687fe5bc (patch) | |
tree | 5c3a7264004b22451f26f54d8dbeae3bb4e35c98 /gv.c | |
parent | c00274d3de5cfa48de2639165ef3aceeb949762b (diff) | |
download | perl-f3ab9a22e0ff7bcf690cebd72982bbf2687fe5bc.tar.gz |
Use leavesublv for all CORE subs
and not just lock, vec and substr. Using a regular leavesub op causes
the return values to be copied. There is no need for that, so this
commit changes them all to use leavesublv.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1400,9 +1400,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, new ATTRSUB. */ (void)core_prototype((SV *)cv, name, code, &opnum); if (ampable) { - if (opnum == OP_VEC || opnum == OP_LOCK - || opnum == OP_SUBSTR) - CvLVALUE_on(cv); + CvLVALUE_on(cv); newATTRSUB(oldsavestack_ix, newSVOP( OP_CONST, 0, @@ -1417,7 +1415,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, ) ); assert(GvCV(gv) == cv); - if (opnum == OP_LOCK) + if (opnum != OP_VEC && opnum != OP_SUBSTR) CvLVALUE_off(cv); /* Now *that* was a neat trick. */ LEAVE; PL_parser = oldparser; |