This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Combine two identical chunks via goto
authorFather Chrysostomos <sprout@cpan.org>
Thu, 4 Sep 2014 06:27:36 +0000 (23:27 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 4 Sep 2014 15:27:30 +0000 (08:27 -0700)
toke.c

diff --git a/toke.c b/toke.c
index 9c9731a..f6d75df 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6583,11 +6583,7 @@ Perl_yylex(pTHX)
 
                    if ((isIDFIRST_lazy_if(s,UTF) || *s == '$') &&
                        (tmp = intuit_method(s, lex ? NULL : sv, cv))) {
-                       op_free(rv2cv_op);
-                       if (tmp == METHOD && !PL_lex_allbrackets &&
-                               PL_lex_fakeeof > LEX_FAKEEOF_LOWLOGIC)
-                           PL_lex_fakeeof = LEX_FAKEEOF_LOWLOGIC;
-                       return REPORT(tmp);
+                       goto method;
                    }
 
                    /* If not a declared subroutine, it's an indirect object. */
@@ -6665,6 +6661,7 @@ Perl_yylex(pTHX)
                if (tmp == 1 && !orig_keyword
                        && (isIDFIRST_lazy_if(s,UTF) || *s == '$')
                        && (tmp = intuit_method(s, lex ? NULL : sv, cv))) {
+                 method:
                    op_free(rv2cv_op);
                    if (tmp == METHOD && !PL_lex_allbrackets &&
                            PL_lex_fakeeof > LEX_FAKEEOF_LOWLOGIC)