diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-06 22:51:15 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-15 06:19:32 -0700 |
commit | c831c5ee90b91c179042ccda588910ba60808970 (patch) | |
tree | 40493e31ac5965e8e447f3f610050eddc2dfa277 /toke.c | |
parent | ae77754ae288180ef1b6bab63dd49fa724d9fddd (diff) | |
download | perl-c831c5ee90b91c179042ccda588910ba60808970.tar.gz |
Remove bogus gv-handling code from toke.c
This code was added by 211a4342c, which was actually restoring some
code that f74617600 removed.
Its purpose was to expand a proxy to a real GV after we found out that
we really are going to compile a sub call op.
This code is actually unreachable at present (sub call lookup via
rv2cv ops expands stub declarations, but not references to constants;
references to constants are not compiled to sub calls), which is a
good thing, because (1) it does not take UTF8 names into account and
(2) it does not work with rv2cv hooks or our subs, because it assumes
that the value of PL_tokenbuf is normative and can be used to
reify a glob.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -6681,7 +6681,6 @@ Perl_yylex(pTHX) /* Not a method, so call it a subroutine (if defined) */ if (cv) { - OP *gvop; /* Check for a constant sub */ if ((sv = cv_const_sv_or_av(cv))) { its_constant: @@ -6699,20 +6698,6 @@ Perl_yylex(pTHX) TOKEN(WORD); } - /* Resolve to GV now if this is a placeholder. */ - if (!off && (gvop = cUNOPx(rv2cv_op)->op_first) - && gvop->op_type == OP_GV) { - GV *gv2 = cGVOPx_gv(gvop); - if (gv2 && !isGV(gv2)) { - gv = gv_fetchpv(PL_tokenbuf, 0, SVt_PVCV); - assert (SvTYPE(gv) == SVt_PVGV); - /* cv must have been some sort of placeholder, - so now needs replacing with a real code - reference. */ - cv = GvCV(gv); - } - } - op_free(pl_yylval.opval); pl_yylval.opval = off ? (OP *)newCVREF(0, rv2cv_op) : rv2cv_op; |