From: Vincent Pit Date: Thu, 19 Aug 2010 15:19:38 +0000 (+0200) Subject: Remove some dead code in indirect_ck_method X-Git-Tag: v0.23~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=4168177ad46806cfb9e0cdb522aed997215cf8b2;p=perl%2Fmodules%2Findirect.git Remove some dead code in indirect_ck_method We already check that the first kid of the method op is a const op. Thus it must have been checked before. Otherwise, someone has returned a const op from a custom check function and haven't recalled in the old check chain, which is bad and ultimately their fault. --- diff --git a/indirect.xs b/indirect.xs index ba9c503..d21b29e 100644 --- a/indirect.xs +++ b/indirect.xs @@ -647,22 +647,14 @@ STATIC OP *indirect_ck_method(pTHX_ OP *o) { line_t line; SV *sv; - if (oi) { - sv = sv_2mortal(newSVpvn(oi->buf, oi->len)); - pos = oi->pos; - /* Keep the old line so that we really point to the first line of the - * expression. */ - line = oi->line; - } else { - sv = cSVOPx_sv(op); - if (!SvPOK(sv) || (SvTYPE(sv) < SVt_PV)) - goto done; - sv = sv_mortalcopy(sv); + if (!oi) + goto done; - if (!indirect_find(sv, PL_oldbufptr, &pos)) - goto done; - line = CopLINE(&PL_compiling); - } + sv = sv_2mortal(newSVpvn(oi->buf, oi->len)); + pos = oi->pos; + /* Keep the old line so that we really point to the first line of the + * expression. */ + line = oi->line; o = CALL_FPTR(indirect_old_ck_method)(aTHX_ o); /* o may now be a method_named */