diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-03 19:03:20 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-03 19:07:54 -0700 |
commit | 10c25cd94120c0e509e5ce54480c24d08281e090 (patch) | |
tree | a36e9ac4ec2f20f04431f4dd37044a2542b3764f /embed.fnc | |
parent | d484d78941e5be45f7c13c93622be0687ef90863 (diff) | |
download | perl-10c25cd94120c0e509e5ce54480c24d08281e090.tar.gz |
Avoid duplicate GV lookup for barewords
Since commit f74617600 (5.12), the GV lookup that this commit removes
from yylex has only been used to see whether the bareword could be a
filehandle. The result is used by intuit_method to decide whether we
have a method call for ‘foo bar’ or ‘foo $bar’.
Doing this lookup for every bareword we encounter even when we are not
going to call intuit_method is wasteful.
The previous commit ensured that intuit_method is called only once
for each bareword, so we can put that gv lookup directly inside
intuit_method.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2369,7 +2369,7 @@ s |void |checkcomma |NN const char *s|NN const char *name \ s |void |force_ident |NN const char *s|int kind s |void |force_ident_maybe_lex|char pit s |void |incline |NN const char *s -s |int |intuit_method |NN char *s|NULLOK GV *gv|NULLOK CV *cv +s |int |intuit_method |NN char *s|NULLOK SV *ioname|NULLOK CV *cv s |int |intuit_more |NN char *s s |I32 |lop |I32 f|int x|NN char *s rs |void |missingterm |NULLOK char *s |