X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=op.c;h=3dd0cdbb94c201ee83654d66fe6ee78f783d3d8b;hb=27cec4bd74b4c0ab87d3b49d275b8814f59e9bfc;hp=fc1c6a8f3030581a754db05c8230a2ff0d201cc9;hpb=0d863452f5cac86322a90184dc68dbf446006ed7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/op.c b/op.c index fc1c6a8..3dd0cdb 100644 --- a/op.c +++ b/op.c @@ -6231,6 +6231,21 @@ Perl_ck_sort(pTHX_ OP *o) { OP *firstkid; + if (o->op_type == OP_SORT && (PL_hints & HINT_LOCALIZE_HH) != 0) + { + HV *hinthv = GvHV(PL_hintgv); + if (hinthv) { + SV **svp = hv_fetch(hinthv, "sort", 4, 0); + if (svp) { + I32 sorthints = (I32)SvIV(*svp); + if ((sorthints & HINT_SORT_QUICKSORT) != 0) + o->op_private |= OPpSORT_QSORT; + if ((sorthints & HINT_SORT_STABLE) != 0) + o->op_private |= OPpSORT_STABLE; + } + } + } + if (o->op_type == OP_SORT && o->op_flags & OPf_STACKED) simplify_sort(o); firstkid = cLISTOPo->op_first->op_sibling; /* get past pushmark */