Skip to content

Commit 9a7d757

Browse files
committed
S_intuit_method: Move code to earlier
The ARGS_ASSERT was later down in the code because of C89 that we are no longer restricted by. Moving it showed a minor flaw: the parameter name asserted for didn't exist. The other code being later could throw away calculations we'd made. Move it to before those calculations
1 parent f79e50e commit 9a7d757

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6078,7 +6078,7 @@ RS |SV * |get_and_check_backslash_N_name_wrapper \
60786078
|NN const char * const e
60796079
S |void |incline |NN const char *s \
60806080
|NN const char *end
6081-
S |int |intuit_method |NN char *s \
6081+
S |int |intuit_method |NN char *start \
60826082
|NULLOK SV *ioname \
60836083
|NULLOK NOCHECK CV *cv
60846084
S |int |intuit_more |NN char *s \

proto.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

toke.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4774,6 +4774,11 @@ S_intuit_more(pTHX_ char *s, char *e)
47744774
STATIC int
47754775
S_intuit_method(pTHX_ char *start, SV *ioname, CV *cv)
47764776
{
4777+
PERL_ARGS_ASSERT_INTUIT_METHOD;
4778+
4779+
if (!FEATURE_INDIRECT_IS_ENABLED)
4780+
return 0;
4781+
47774782
char *s = start + (*start == '$');
47784783
char tmpbuf[sizeof PL_tokenbuf];
47794784
STRLEN len;
@@ -4785,11 +4790,6 @@ S_intuit_method(pTHX_ char *start, SV *ioname, CV *cv)
47854790
GV * const gv =
47864791
ioname ? gv_fetchsv(ioname, GV_NOADD_NOINIT, SVt_PVCV) : NULL;
47874792

4788-
PERL_ARGS_ASSERT_INTUIT_METHOD;
4789-
4790-
if (!FEATURE_INDIRECT_IS_ENABLED)
4791-
return 0;
4792-
47934793
if (gv && SvTYPE(gv) == SVt_PVGV && GvIO(gv))
47944794
return 0;
47954795
if (cv && SvPOK(cv)) {

0 commit comments

Comments
 (0)