From: Father Chrysostomos Date: Wed, 4 Jul 2012 05:21:45 +0000 (-0700) Subject: op.c: Merge some code X-Git-Tag: upstream/5.20.0~6152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8023b71189cc47b06d6a28e1d2e4c213c4d0d4d8;p=platform%2Fupstream%2Fperl.git op.c: Merge some code --- diff --git a/op.c b/op.c index b3a3a59..14cc21f 100644 --- a/op.c +++ b/op.c @@ -9306,6 +9306,7 @@ S_simplify_sort(pTHX_ OP *o) int descending; GV *gv; const char *gvname; + bool have_scopeop; PERL_ARGS_ASSERT_SIMPLIFY_SORT; @@ -9314,23 +9315,15 @@ S_simplify_sort(pTHX_ OP *o) GvMULTI_on(gv_fetchpvs("a", GV_ADD|GV_NOTQUAL, SVt_PV)); GvMULTI_on(gv_fetchpvs("b", GV_ADD|GV_NOTQUAL, SVt_PV)); kid = kUNOP->op_first; /* get past null */ - if (kid->op_type != OP_SCOPE) - { - if (kid->op_type != OP_LEAVE) return; - kid = kLISTOP->op_last; - switch(kid->op_type) { - case OP_NCMP: - case OP_I_NCMP: - case OP_SCMP: - goto padkids; - } + if (!(have_scopeop = kid->op_type == OP_SCOPE) + && kid->op_type != OP_LEAVE) return; - } kid = kLISTOP->op_last; /* get past scope */ switch(kid->op_type) { case OP_NCMP: case OP_I_NCMP: case OP_SCMP: + if (!have_scopeop) goto padkids; break; default: return;