diff options
-rw-r--r-- | lib/B/Op_private.pm | 8 | ||||
-rw-r--r-- | op.c | 13 | ||||
-rw-r--r-- | opcode.h | 196 | ||||
-rw-r--r-- | perl.h | 4 | ||||
-rw-r--r-- | pp_sort.c | 8 | ||||
-rw-r--r-- | regen/op_private | 2 |
6 files changed, 97 insertions, 134 deletions
diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm index 2caf7b9329..42a27ad8cc 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -543,7 +543,7 @@ $bits{sin}{0} = $bf[0]; $bits{snetent}{0} = $bf[0]; @{$bits{socket}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{sockpair}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); -@{$bits{sort}}{7,6,4,3,2,1,0} = ('OPpSORT_UNSTABLE', 'OPpSORT_STABLE', 'OPpSORT_DESCEND', 'OPpSORT_INPLACE', 'OPpSORT_REVERSE', 'OPpSORT_INTEGER', 'OPpSORT_NUMERIC'); +@{$bits{sort}}{4,3,2,1,0} = ('OPpSORT_DESCEND', 'OPpSORT_INPLACE', 'OPpSORT_REVERSE', 'OPpSORT_INTEGER', 'OPpSORT_NUMERIC'); @{$bits{splice}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @{$bits{split}}{4,3,2} = ('OPpSPLIT_ASSIGN', 'OPpSPLIT_LEX', 'OPpSPLIT_IMPLIM'); @{$bits{sprintf}}{3,2,1,0} = ($bf[4], $bf[4], $bf[4], $bf[4]); @@ -684,8 +684,6 @@ our %defines = ( OPpSORT_INTEGER => 2, OPpSORT_NUMERIC => 1, OPpSORT_REVERSE => 4, - OPpSORT_STABLE => 64, - OPpSORT_UNSTABLE => 128, OPpSPLIT_ASSIGN => 16, OPpSPLIT_IMPLIM => 4, OPpSPLIT_LEX => 8, @@ -787,8 +785,6 @@ our %labels = ( OPpSORT_INTEGER => 'INT', OPpSORT_NUMERIC => 'NUM', OPpSORT_REVERSE => 'REV', - OPpSORT_STABLE => 'STABLE', - OPpSORT_UNSTABLE => 'UNSTABLE', OPpSPLIT_ASSIGN => 'ASSIGN', OPpSPLIT_IMPLIM => 'IMPLIM', OPpSPLIT_LEX => 'LEX', @@ -888,8 +884,6 @@ $ops_using{OPpSORT_INPLACE} = $ops_using{OPpSORT_DESCEND}; $ops_using{OPpSORT_INTEGER} = $ops_using{OPpSORT_DESCEND}; $ops_using{OPpSORT_NUMERIC} = $ops_using{OPpSORT_DESCEND}; $ops_using{OPpSORT_REVERSE} = $ops_using{OPpSORT_DESCEND}; -$ops_using{OPpSORT_STABLE} = $ops_using{OPpSORT_DESCEND}; -$ops_using{OPpSORT_UNSTABLE} = $ops_using{OPpSORT_DESCEND}; $ops_using{OPpSPLIT_IMPLIM} = $ops_using{OPpSPLIT_ASSIGN}; $ops_using{OPpSPLIT_LEX} = $ops_using{OPpSPLIT_ASSIGN}; $ops_using{OPpTRANS_COMPLEMENT} = $ops_using{OPpTRANS_CAN_FORCE_UTF8}; @@ -14096,23 +14096,10 @@ Perl_ck_sort(pTHX_ OP *o) { OP *firstkid; OP *kid; - HV * const hinthv = - PL_hints & HINT_LOCALIZE_HH ? GvHV(PL_hintgv) : NULL; U8 stacked; PERL_ARGS_ASSERT_CK_SORT; - if (hinthv) { - SV ** const svp = hv_fetchs(hinthv, "sort", FALSE); - if (svp) { - const I32 sorthints = (I32)SvIV(*svp); - if ((sorthints & HINT_SORT_STABLE) != 0) - o->op_private |= OPpSORT_STABLE; - if ((sorthints & HINT_SORT_UNSTABLE) != 0) - o->op_private |= OPpSORT_UNSTABLE; - } - } - if (o->op_flags & OPf_STACKED) simplify_sort(o); firstkid = OpSIBLING(cLISTOPo->op_first); /* get past pushmark */ @@ -2306,7 +2306,6 @@ END_EXTERN_C #define OPpREFCOUNTED 0x40 #define OPpREPEAT_DOLIST 0x40 #define OPpSLICE 0x40 -#define OPpSORT_STABLE 0x40 #define OPpTRANS_GROWS 0x40 #define OPpPADRANGE_COUNTMASK 0x7f #define OPpASSIGN_CV_TO_GV 0x80 @@ -2317,7 +2316,6 @@ END_EXTERN_C #define OPpOFFBYONE 0x80 #define OPpOPEN_OUT_CRLF 0x80 #define OPpPV_IS_UTF8 0x80 -#define OPpSORT_UNSTABLE 0x80 #define OPpTRANS_DELETE 0x80 START_EXTERN_C @@ -2421,7 +2419,6 @@ EXTCONST char PL_op_private_labels[] = { 'S','L','I','C','E','\0', 'S','L','I','C','E','W','A','R','N','\0', 'S','Q','U','A','S','H','\0', - 'S','T','A','B','L','E','\0', 'S','T','A','T','E','\0', 'S','T','R','I','C','T','\0', 'S','T','R','I','N','G','I','F','Y','\0', @@ -2430,7 +2427,6 @@ EXTCONST char PL_op_private_labels[] = { 'T','A','R','G','\0', 'T','A','R','G','M','Y','\0', 'U','N','I','\0', - 'U','N','S','T','A','B','L','E','\0', 'U','S','E','_','S','V','O','P','\0', 'U','T','F','\0', 'k','e','y','\0', @@ -2454,14 +2450,14 @@ EXTCONST char PL_op_private_labels[] = { EXTCONST I16 PL_op_private_bitfields[] = { 0, 8, -1, 0, 8, -1, - 0, 597, -1, + 0, 581, -1, 0, 8, -1, 0, 8, -1, - 0, 604, -1, - 0, 593, -1, - 1, -1, 0, 552, 1, 30, 2, 295, -1, + 0, 588, -1, + 0, 577, -1, + 1, -1, 0, 545, 1, 30, 2, 295, -1, 4, -1, 1, 176, 2, 183, 3, 190, -1, - 4, -1, 0, 552, 1, 30, 2, 295, 3, 122, -1, + 4, -1, 0, 545, 1, 30, 2, 295, 3, 122, -1, }; @@ -2638,49 +2634,49 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* shift */ 93, /* unshift */ 152, /* sort */ - 159, /* reverse */ + 157, /* reverse */ 0, /* grepstart */ - 161, /* grepwhile */ + 159, /* grepwhile */ 0, /* mapstart */ 0, /* mapwhile */ 0, /* range */ - 163, /* flip */ - 163, /* flop */ + 161, /* flip */ + 161, /* flop */ 0, /* and */ 0, /* or */ 12, /* xor */ 0, /* dor */ - 165, /* cond_expr */ + 163, /* cond_expr */ 0, /* andassign */ 0, /* orassign */ 0, /* dorassign */ - 167, /* entersub */ - 174, /* leavesub */ - 174, /* leavesublv */ + 165, /* entersub */ + 172, /* leavesub */ + 172, /* leavesublv */ 0, /* argcheck */ - 176, /* argelem */ + 174, /* argelem */ 0, /* argdefelem */ - 178, /* caller */ + 176, /* caller */ 52, /* warn */ 52, /* die */ 52, /* reset */ -1, /* lineseq */ - 180, /* nextstate */ - 180, /* dbstate */ + 178, /* nextstate */ + 178, /* dbstate */ -1, /* unstack */ -1, /* enter */ - 181, /* leave */ + 179, /* leave */ -1, /* scope */ - 183, /* enteriter */ - 187, /* iter */ + 181, /* enteriter */ + 185, /* iter */ -1, /* enterloop */ - 188, /* leaveloop */ + 186, /* leaveloop */ -1, /* return */ - 190, /* last */ - 190, /* next */ - 190, /* redo */ - 190, /* dump */ - 190, /* goto */ + 188, /* last */ + 188, /* next */ + 188, /* redo */ + 188, /* dump */ + 188, /* goto */ 52, /* exit */ 0, /* method */ 0, /* method_named */ @@ -2693,7 +2689,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* leavewhen */ -1, /* break */ -1, /* continue */ - 192, /* open */ + 190, /* open */ 52, /* close */ 52, /* pipe_op */ 52, /* fileno */ @@ -2709,7 +2705,7 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 52, /* getc */ 52, /* read */ 52, /* enterwrite */ - 174, /* leavewrite */ + 172, /* leavewrite */ -1, /* prtf */ -1, /* print */ -1, /* say */ @@ -2739,33 +2735,33 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* getpeername */ 0, /* lstat */ 0, /* stat */ - 197, /* ftrread */ - 197, /* ftrwrite */ - 197, /* ftrexec */ - 197, /* fteread */ - 197, /* ftewrite */ - 197, /* fteexec */ - 202, /* ftis */ - 202, /* ftsize */ - 202, /* ftmtime */ - 202, /* ftatime */ - 202, /* ftctime */ - 202, /* ftrowned */ - 202, /* fteowned */ - 202, /* ftzero */ - 202, /* ftsock */ - 202, /* ftchr */ - 202, /* ftblk */ - 202, /* ftfile */ - 202, /* ftdir */ - 202, /* ftpipe */ - 202, /* ftsuid */ - 202, /* ftsgid */ - 202, /* ftsvtx */ - 202, /* ftlink */ - 202, /* fttty */ - 202, /* fttext */ - 202, /* ftbinary */ + 195, /* ftrread */ + 195, /* ftrwrite */ + 195, /* ftrexec */ + 195, /* fteread */ + 195, /* ftewrite */ + 195, /* fteexec */ + 200, /* ftis */ + 200, /* ftsize */ + 200, /* ftmtime */ + 200, /* ftatime */ + 200, /* ftctime */ + 200, /* ftrowned */ + 200, /* fteowned */ + 200, /* ftzero */ + 200, /* ftsock */ + 200, /* ftchr */ + 200, /* ftblk */ + 200, /* ftfile */ + 200, /* ftdir */ + 200, /* ftpipe */ + 200, /* ftsuid */ + 200, /* ftsgid */ + 200, /* ftsvtx */ + 200, /* ftlink */ + 200, /* fttty */ + 200, /* fttext */ + 200, /* ftbinary */ 93, /* chdir */ 93, /* chown */ 75, /* chroot */ @@ -2785,17 +2781,17 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* rewinddir */ 0, /* closedir */ -1, /* fork */ - 206, /* wait */ + 204, /* wait */ 93, /* waitpid */ 93, /* system */ 93, /* exec */ 93, /* kill */ - 206, /* getppid */ + 204, /* getppid */ 93, /* getpgrp */ 93, /* setpgrp */ 93, /* getpriority */ 93, /* setpriority */ - 206, /* time */ + 204, /* time */ -1, /* tms */ 0, /* localtime */ 52, /* gmtime */ @@ -2815,8 +2811,8 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* require */ 0, /* dofile */ -1, /* hintseval */ - 207, /* entereval */ - 174, /* leaveeval */ + 205, /* entereval */ + 172, /* leaveeval */ 0, /* entertry */ -1, /* leavetry */ 0, /* ghbyname */ @@ -2854,18 +2850,18 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 0, /* lock */ 0, /* once */ -1, /* custom */ - 213, /* coreargs */ - 217, /* avhvswitch */ + 211, /* coreargs */ + 215, /* avhvswitch */ 3, /* runcv */ 0, /* fc */ -1, /* padcv */ -1, /* introcv */ -1, /* clonecv */ - 219, /* padrange */ - 221, /* refassign */ - 227, /* lvref */ - 233, /* lvrefslice */ - 234, /* lvavref */ + 217, /* padrange */ + 219, /* refassign */ + 225, /* lvref */ + 231, /* lvrefslice */ + 232, /* lvavref */ 0, /* anonconst */ 12, /* isa */ 0, /* cmpchain_and */ @@ -2893,54 +2889,54 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { EXTCONST U16 PL_op_private_bitdefs[] = { 0x0003, /* scalar, prototype, refgen, srefgen, readline, regcmaybe, regcreset, regcomp, substcont, chop, schop, defined, undef, study, preinc, i_preinc, predec, i_predec, postinc, i_postinc, postdec, i_postdec, negate, i_negate, not, complement, ucfirst, lcfirst, uc, lc, quotemeta, aeach, avalues, each, pop, shift, grepstart, mapstart, mapwhile, range, and, or, dor, andassign, orassign, dorassign, argcheck, argdefelem, method, method_named, method_super, method_redir, method_redir_super, entergiven, leavegiven, enterwhen, leavewhen, untie, tied, dbmclose, getsockname, getpeername, lstat, stat, readlink, readdir, telldir, rewinddir, closedir, localtime, alarm, require, dofile, entertry, ghbyname, gnbyname, gpbyname, shostent, snetent, sprotoent, sservent, gpwnam, gpwuid, ggrnam, ggrgid, lock, once, fc, anonconst, cmpchain_and, cmpchain_dup, entertrycatch, catch */ - 0x2fdc, 0x41b9, /* pushmark */ + 0x2fdc, 0x40d9, /* pushmark */ 0x00bd, /* wantarray, runcv */ - 0x0438, 0x1a50, 0x426c, 0x3d28, 0x3505, /* const */ + 0x0438, 0x1a50, 0x418c, 0x3d28, 0x3505, /* const */ 0x2fdc, 0x3659, /* gvsv */ 0x18b5, /* gv */ 0x0067, /* gelem, lt, i_lt, gt, i_gt, le, i_le, ge, i_ge, eq, i_eq, ne, i_ne, ncmp, i_ncmp, slt, sgt, sle, sge, seq, sne, scmp, bit_and, bit_xor, bit_or, sbit_and, sbit_xor, sbit_or, smartmatch, lslice, xor, isa */ - 0x2fdc, 0x41b8, 0x03d7, /* padsv */ - 0x2fdc, 0x41b8, 0x05b4, 0x30cc, 0x3ea9, /* padav */ - 0x2fdc, 0x41b8, 0x05b4, 0x0650, 0x30cc, 0x3ea8, 0x2b41, /* padhv */ - 0x2fdc, 0x1c38, 0x03d6, 0x30cc, 0x3428, 0x4264, 0x0003, /* rv2gv */ - 0x2fdc, 0x3658, 0x03d6, 0x4264, 0x0003, /* rv2sv */ + 0x2fdc, 0x40d8, 0x03d7, /* padsv */ + 0x2fdc, 0x40d8, 0x05b4, 0x30cc, 0x3ea9, /* padav */ + 0x2fdc, 0x40d8, 0x05b4, 0x0650, 0x30cc, 0x3ea8, 0x2b41, /* padhv */ + 0x2fdc, 0x1c38, 0x03d6, 0x30cc, 0x3428, 0x4184, 0x0003, /* rv2gv */ + 0x2fdc, 0x3658, 0x03d6, 0x4184, 0x0003, /* rv2sv */ 0x30cc, 0x0003, /* av2arylen, akeys, values, keys */ - 0x339c, 0x1078, 0x0dd4, 0x014c, 0x4568, 0x4264, 0x0003, /* rv2cv */ + 0x339c, 0x1078, 0x0dd4, 0x014c, 0x4488, 0x4184, 0x0003, /* rv2cv */ 0x05b4, 0x0650, 0x0003, /* ref */ 0x018f, /* bless, glob, sprintf, formline, unpack, pack, join, anonlist, anonhash, splice, warn, die, reset, exit, close, pipe_op, fileno, umask, binmode, tie, dbmopen, sselect, select, getc, read, enterwrite, sysopen, sysseek, sysread, syswrite, eof, tell, seek, truncate, fcntl, ioctl, send, recv, socket, sockpair, bind, connect, listen, accept, shutdown, gsockopt, ssockopt, open_dir, seekdir, gmtime, shmget, shmctl, shmread, shmwrite, msgget, msgctl, msgsnd, msgrcv, semop, semget, semctl, ghbyaddr, gnbyaddr, gpbynumber, gsbyname, gsbyport, syscall */ 0x383c, 0x3758, 0x2894, 0x27d0, 0x0003, /* backtick */ 0x05b5, /* subst */ - 0x117c, 0x21b8, 0x09b4, 0x3fec, 0x2548, 0x4884, 0x07c1, /* trans, transr */ + 0x117c, 0x21b8, 0x09b4, 0x3fec, 0x2548, 0x4684, 0x07c1, /* trans, transr */ 0x0fbc, 0x04d8, 0x0067, /* sassign */ 0x0c78, 0x0b74, 0x0a70, 0x30cc, 0x05a8, 0x0067, /* aassign */ - 0x4610, 0x0003, /* chomp, schomp, ncomplement, scomplement, sin, cos, exp, log, sqrt, int, hex, oct, abs, ord, chr, chroot, rmdir */ + 0x4530, 0x0003, /* chomp, schomp, ncomplement, scomplement, sin, cos, exp, log, sqrt, int, hex, oct, abs, ord, chr, chroot, rmdir */ 0x05b4, 0x30cc, 0x0003, /* pos */ - 0x4610, 0x0067, /* pow, multiply, i_multiply, divide, i_divide, modulo, i_modulo, add, i_add, subtract, i_subtract, left_shift, right_shift, nbit_and, nbit_xor, nbit_or */ + 0x4530, 0x0067, /* pow, multiply, i_multiply, divide, i_divide, modulo, i_modulo, add, i_add, subtract, i_subtract, left_shift, right_shift, nbit_and, nbit_xor, nbit_or */ 0x1538, 0x0067, /* repeat */ - 0x32b8, 0x4610, 0x0067, /* concat */ - 0x2fdc, 0x0218, 0x1c34, 0x4610, 0x434c, 0x0003, /* multiconcat */ - 0x4610, 0x018f, /* stringify, atan2, rand, srand, crypt, push, unshift, flock, chdir, chown, unlink, chmod, utime, rename, link, symlink, mkdir, waitpid, system, exec, kill, getpgrp, setpgrp, getpriority, setpriority, sleep */ - 0x05b4, 0x4610, 0x0003, /* length */ + 0x32b8, 0x4530, 0x0067, /* concat */ + 0x2fdc, 0x0218, 0x1c34, 0x4530, 0x426c, 0x0003, /* multiconcat */ + 0x4530, 0x018f, /* stringify, atan2, rand, srand, crypt, push, unshift, flock, chdir, chown, unlink, chmod, utime, rename, link, symlink, mkdir, waitpid, system, exec, kill, getpgrp, setpgrp, getpriority, setpriority, sleep */ + 0x05b4, 0x4530, 0x0003, /* length */ 0x3a90, 0x30cc, 0x012b, /* substr */ 0x30cc, 0x0067, /* vec */ - 0x3238, 0x05b4, 0x4610, 0x018f, /* index, rindex */ - 0x2fdc, 0x3658, 0x05b4, 0x30cc, 0x3ea8, 0x4264, 0x0003, /* rv2av */ + 0x3238, 0x05b4, 0x4530, 0x018f, /* index, rindex */ + 0x2fdc, 0x3658, 0x05b4, 0x30cc, 0x3ea8, 0x4184, 0x0003, /* rv2av */ 0x025f, /* aelemfast, aelemfast_lex */ 0x2fdc, 0x2ed8, 0x03d6, 0x30cc, 0x0067, /* aelem, helem */ 0x2fdc, 0x30cc, 0x3ea9, /* aslice, hslice */ 0x30cd, /* kvaslice, kvhslice */ 0x2fdc, 0x3df8, 0x2bf4, 0x0003, /* delete */ - 0x4498, 0x0003, /* exists */ - 0x2fdc, 0x3658, 0x05b4, 0x0650, 0x30cc, 0x3ea8, 0x4264, 0x2b41, /* rv2hv */ - 0x2fdc, 0x2ed8, 0x11f4, 0x1b50, 0x30cc, 0x4264, 0x0003, /* multideref */ + 0x43b8, 0x0003, /* exists */ + 0x2fdc, 0x3658, 0x05b4, 0x0650, 0x30cc, 0x3ea8, 0x4184, 0x2b41, /* rv2hv */ + 0x2fdc, 0x2ed8, 0x11f4, 0x1b50, 0x30cc, 0x4184, 0x0003, /* multideref */ 0x2fdc, 0x3658, 0x02f0, 0x2cec, 0x2609, /* split */ 0x2fdc, 0x2279, /* list */ - 0x477c, 0x40d8, 0x1490, 0x292c, 0x3b88, 0x2a24, 0x35c1, /* sort */ + 0x1490, 0x292c, 0x3b88, 0x2a24, 0x35c1, /* sort */ 0x292c, 0x0003, /* reverse */ 0x05b4, 0x0003, /* grepwhile */ 0x2d78, 0x0003, /* flip, flop */ 0x2fdc, 0x0003, /* cond_expr */ - 0x2fdc, 0x1078, 0x03d6, 0x014c, 0x4568, 0x4264, 0x26e1, /* entersub */ + 0x2fdc, 0x1078, 0x03d6, 0x014c, 0x4488, 0x4184, 0x26e1, /* entersub */ 0x38f8, 0x0003, /* leavesub, leavesublv, leavewrite, leaveeval */ 0x02aa, 0x0003, /* argelem */ 0x00bc, 0x018f, /* caller */ @@ -2949,19 +2945,19 @@ EXTCONST U16 PL_op_private_bitdefs[] = { 0x2fdc, 0x3658, 0x10ec, 0x3c05, /* enteriter */ 0x3c05, /* iter */ 0x2e7c, 0x0067, /* leaveloop */ - 0x49bc, 0x0003, /* last, next, redo, dump, goto */ + 0x47bc, 0x0003, /* last, next, redo, dump, goto */ 0x383c, 0x3758, 0x2894, 0x27d0, 0x018f, /* open */ 0x1df0, 0x204c, 0x1f08, 0x1cc4, 0x0003, /* ftrread, ftrwrite, ftrexec, fteread, ftewrite, fteexec */ 0x1df0, 0x204c, 0x1f08, 0x0003, /* ftis, ftsize, ftmtime, ftatime, ftctime, ftrowned, fteowned, ftzero, ftsock, ftchr, ftblk, ftfile, ftdir, ftpipe, ftsuid, ftsgid, ftsvtx, ftlink, fttty, fttext, ftbinary */ - 0x4611, /* wait, getppid, time */ - 0x3994, 0x0e90, 0x070c, 0x46e8, 0x2364, 0x0003, /* entereval */ + 0x4531, /* wait, getppid, time */ + 0x3994, 0x0e90, 0x070c, 0x4608, 0x2364, 0x0003, /* entereval */ 0x319c, 0x0018, 0x13a4, 0x12c1, /* coreargs */ 0x30cc, 0x00c7, /* avhvswitch */ 0x2fdc, 0x01fb, /* padrange */ - 0x2fdc, 0x41b8, 0x04f6, 0x2aac, 0x19a8, 0x0067, /* refassign */ - 0x2fdc, 0x41b8, 0x04f6, 0x2aac, 0x19a8, 0x0003, /* lvref */ + 0x2fdc, 0x40d8, 0x04f6, 0x2aac, 0x19a8, 0x0067, /* refassign */ + 0x2fdc, 0x40d8, 0x04f6, 0x2aac, 0x19a8, 0x0003, /* lvref */ 0x2fdd, /* lvrefslice */ - 0x2fdc, 0x41b8, 0x0003, /* lvavref */ + 0x2fdc, 0x40d8, 0x0003, /* lvavref */ }; @@ -3137,7 +3133,7 @@ EXTCONST U8 PL_op_private_valid[] = { /* POP */ (OPpARG1_MASK), /* SHIFT */ (OPpARG1_MASK), /* UNSHIFT */ (OPpARG4_MASK|OPpTARGET_MY), - /* SORT */ (OPpSORT_NUMERIC|OPpSORT_INTEGER|OPpSORT_REVERSE|OPpSORT_INPLACE|OPpSORT_DESCEND|OPpSORT_STABLE|OPpSORT_UNSTABLE), + /* SORT */ (OPpSORT_NUMERIC|OPpSORT_INTEGER|OPpSORT_REVERSE|OPpSORT_INPLACE|OPpSORT_DESCEND), /* REVERSE */ (OPpARG1_MASK|OPpREVERSE_INPLACE), /* GREPSTART */ (OPpARG1_MASK), /* GREPWHILE */ (OPpARG1_MASK|OPpTRUEBOOL), @@ -5535,10 +5535,6 @@ typedef enum { 0x80000000 */ -/* The following are stored in $^H{sort}, not in PL_hints */ -#define HINT_SORT_STABLE 0x00000100 /* sort styles */ -#define HINT_SORT_UNSTABLE 0x00000200 - #define HINT_ALL_STRICT HINT_STRICT_REFS \ | HINT_STRICT_SUBS \ | HINT_STRICT_VARS @@ -34,10 +34,6 @@ #define SMALLSORT (200) #endif -/* Flags for sortsv_flags */ -#define SORTf_STABLE 1 -#define SORTf_UNSTABLE 2 - /* * The mergesort implementation is by Peter M. Mcilroy <pmcilroy@lucent.com>. * @@ -711,10 +707,6 @@ PP(pp_sort) if ((priv & OPpSORT_DESCEND) != 0) descending = 1; - if ((priv & OPpSORT_STABLE) != 0) - sort_flags |= SORTf_STABLE; - if ((priv & OPpSORT_UNSTABLE) != 0) - sort_flags |= SORTf_UNSTABLE; if (gimme != G_LIST) { SP = MARK; diff --git a/regen/op_private b/regen/op_private index c14bb168dc..ea24474308 100644 --- a/regen/op_private +++ b/regen/op_private @@ -676,8 +676,6 @@ addbits('sort', 2 => qw(OPpSORT_REVERSE REV ), # Reversed sort 3 => qw(OPpSORT_INPLACE INPLACE), # sort in-place; eg @a = sort @a 4 => qw(OPpSORT_DESCEND DESC ), # Descending sort - 6 => qw(OPpSORT_STABLE STABLE ), # Use a stable algorithm - 7 => qw(OPpSORT_UNSTABLE UNSTABLE),# Use an unstable algorithm ); |