In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/6402d4ee6fab9f5d76a131921ef72d686ad7aac5?hp=93f5d0e84de625ae81930095bb540c0d9dbda3f2>
- Log ----------------------------------------------------------------- commit 6402d4ee6fab9f5d76a131921ef72d686ad7aac5 Author: Father Chrysostomos <[email protected]> Date: Fri Nov 7 17:52:41 2014 -0800 Update B::Deparse for last two commits M lib/B/Deparse.pm commit 6abbd373e741488741fdb8a7d9b6ef6ae89ed48c Author: Father Chrysostomos <[email protected]> Date: Fri Nov 7 14:55:24 2014 -0800 Allow OPpTARGET_MY optimisation for x Many operators have a special SV allocated in the pad which is used for return values (the target). If we make that pad offset point to a lexical variable, then we can optimise, say, $lexical = "$foo" into just "$foo", where $lexical is stringifyâs âtargetâ. And pp_stringify doesnât need to know any better. We already do that for many ops. This can be extended to x. Despite what the comment in op_private says, list return values do not matter here, because the OPpTARGET_MY optimisation only happens when the operator is in scalar context. And the scalar code paths use TARG and push TARG on to the stack. M lib/B/Op_private.pm M opcode.h M regen/op_private M regen/opcodes commit db098081e3682316e8cf22b9705c2563fc91eaec Author: Father Chrysostomos <[email protected]> Date: Fri Nov 7 14:43:39 2014 -0800 Allow OPpTARGET_MY optimisation for vec Many operators have a special SV allocated in the pad which is used for return values (the target). If we make that pad offset point to a lexical variable, then we can optimise, say, $lexical = "$foo" into just "$foo", where $lexical is stringifyâs âtargetâ. And pp_stringify doesnât need to know any better. We already do that for many ops. This can be extended to vec(). Despite what the comment in op_pri- vate says, lvalue usage does not matter here, because the OPpTARGET_MY optimisation only happens when the operator is in rvalue context. And the rvalue code paths use TARG and push TARG on to the stack. M lib/B/Op_private.pm M opcode.h M regen/op_private M regen/opcodes ----------------------------------------------------------------------- Summary of changes: lib/B/Deparse.pm | 6 +- lib/B/Op_private.pm | 2 +- opcode.h | 584 ++++++++++++++++++++++++++-------------------------- regen/op_private | 2 - regen/opcodes | 4 +- 5 files changed, 299 insertions(+), 299 deletions(-) diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm index d5f0bd5..ef22e06 100644 --- a/lib/B/Deparse.pm +++ b/lib/B/Deparse.pm @@ -2637,8 +2637,10 @@ sub real_concat { return $self->maybe_parens("$left .$eq $right", $cx, $prec); } +sub pp_repeat { maybe_targmy(@_, \&repeat) } + # 'x' is weird when the left arg is a list -sub pp_repeat { +sub repeat { my $self = shift; my($op, $cx) = @_; my $left = $op->first; @@ -2830,7 +2832,7 @@ sub pp_substr { } maybe_local(@_, listop(@_, "substr")) } -sub pp_vec { maybe_local(@_, listop(@_, "vec")) } +sub pp_vec { maybe_targmy(@_, \&maybe_local, listop(@_, "vec")) } sub pp_index { maybe_targmy(@_, \&listop, "index") } sub pp_rindex { maybe_targmy(@_, \&listop, "rindex") } sub pp_sprintf { maybe_targmy(@_, \&listop, "sprintf") } diff --git a/lib/B/Op_private.pm b/lib/B/Op_private.pm index 1d34009..d9dbb8b 100644 --- a/lib/B/Op_private.pm +++ b/lib/B/Op_private.pm @@ -144,7 +144,7 @@ $bits{$_}{7} = 'OPpPV_IS_UTF8' for qw(dump goto last next redo); $bits{$_}{6} = 'OPpREFCOUNTED' for qw(leave leaveeval leavesub leavesublv leavewrite); $bits{$_}{6} = 'OPpRUNTIME' for qw(match pushre qr subst substcont); $bits{$_}{2} = 'OPpSLICEWARNING' for qw(aslice hslice padav padhv rv2av rv2hv); -$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_negat ... [298 chars truncated] +$bits{$_}{4} = 'OPpTARGET_MY' for qw(abs add atan2 chdir chmod chomp chown chr chroot concat cos crypt divide exec exp flock getpgrp getppid getpriority hex i_add i_divide i_modulo i_multiply i_negat ... [309 chars truncated] $bits{$_}{5} = 'OPpTRANS_COMPLEMENT' for qw(trans transr); $bits{$_}{7} = 'OPpTRANS_DELETE' for qw(trans transr); $bits{$_}{0} = 'OPpTRANS_FROM_UTF' for qw(trans transr); diff --git a/opcode.h b/opcode.h index c367c09..04fdbfd 100644 --- a/opcode.h +++ b/opcode.h @@ -1802,7 +1802,7 @@ EXTCONST U32 PL_opargs[] = { 0x0001121e, /* i_divide */ 0x0001123e, /* modulo */ 0x0001121e, /* i_modulo */ - 0x0001220b, /* repeat */ + 0x0001221b, /* repeat */ 0x0001123e, /* add */ 0x0001121e, /* i_add */ 0x0001123e, /* subtract */ @@ -1854,7 +1854,7 @@ EXTCONST U32 PL_opargs[] = { 0x00009b9e, /* abs */ 0x00009b9e, /* length */ 0x0991140c, /* substr */ - 0x0011140c, /* vec */ + 0x0011141c, /* vec */ 0x0091141c, /* index */ 0x0091141c, /* rindex */ 0x0002140f, /* sprintf */ @@ -2428,326 +2428,326 @@ EXTCONST I16 PL_op_private_bitdef_ix[] = { 123, /* modulo */ 125, /* i_modulo */ 127, /* repeat */ - 129, /* add */ - 131, /* i_add */ - 133, /* subtract */ - 135, /* i_subtract */ - 137, /* concat */ - 139, /* stringify */ - 141, /* left_shift */ - 143, /* right_shift */ - 145, /* lt */ - 146, /* i_lt */ - 147, /* gt */ - 148, /* i_gt */ - 149, /* le */ - 150, /* i_le */ - 151, /* ge */ - 152, /* i_ge */ - 153, /* eq */ - 154, /* i_eq */ - 155, /* ne */ - 156, /* i_ne */ - 157, /* ncmp */ - 158, /* i_ncmp */ - 159, /* slt */ - 160, /* sgt */ - 161, /* sle */ - 162, /* sge */ - 163, /* seq */ - 164, /* sne */ - 165, /* scmp */ - 166, /* bit_and */ - 167, /* bit_xor */ - 168, /* bit_or */ - 169, /* negate */ - 170, /* i_negate */ - 172, /* not */ - 173, /* complement */ - 174, /* smartmatch */ - 175, /* atan2 */ - 177, /* sin */ - 179, /* cos */ - 181, /* rand */ - 183, /* srand */ - 185, /* exp */ - 187, /* log */ - 189, /* sqrt */ - 191, /* int */ - 193, /* hex */ - 195, /* oct */ - 197, /* abs */ - 199, /* length */ - 201, /* substr */ - 204, /* vec */ - 206, /* index */ - 208, /* rindex */ - 210, /* sprintf */ - 211, /* formline */ - 212, /* ord */ - 214, /* chr */ - 216, /* crypt */ - 218, /* ucfirst */ - 219, /* lcfirst */ - 220, /* uc */ - 221, /* lc */ - 222, /* quotemeta */ - 223, /* rv2av */ - 229, /* aelemfast */ - 230, /* aelemfast_lex */ - 231, /* aelem */ - 236, /* aslice */ - 239, /* kvaslice */ - 240, /* aeach */ - 241, /* akeys */ - 242, /* avalues */ - 243, /* each */ - 244, /* values */ - 245, /* keys */ - 247, /* delete */ - 250, /* exists */ - 252, /* rv2hv */ - 260, /* helem */ - 265, /* hslice */ - 268, /* kvhslice */ - 269, /* unpack */ - 270, /* pack */ - 271, /* split */ - 273, /* join */ - 274, /* list */ - 276, /* lslice */ - 277, /* anonlist */ - 278, /* anonhash */ - 279, /* splice */ - 280, /* push */ - 282, /* pop */ - 283, /* shift */ - 284, /* unshift */ - 286, /* sort */ - 293, /* reverse */ - 295, /* grepstart */ - 296, /* grepwhile */ - 298, /* mapstart */ - 299, /* mapwhile */ - 301, /* range */ - 302, /* flip */ - 304, /* flop */ - 306, /* and */ - 307, /* or */ - 308, /* xor */ - 309, /* dor */ - 310, /* cond_expr */ - 312, /* andassign */ - 313, /* orassign */ - 314, /* dorassign */ - 315, /* method */ - 316, /* entersub */ - 323, /* leavesub */ - 325, /* leavesublv */ - 327, /* caller */ - 329, /* warn */ - 330, /* die */ - 331, /* reset */ + 130, /* add */ + 132, /* i_add */ + 134, /* subtract */ + 136, /* i_subtract */ + 138, /* concat */ + 140, /* stringify */ + 142, /* left_shift */ + 144, /* right_shift */ + 146, /* lt */ + 147, /* i_lt */ + 148, /* gt */ + 149, /* i_gt */ + 150, /* le */ + 151, /* i_le */ + 152, /* ge */ + 153, /* i_ge */ + 154, /* eq */ + 155, /* i_eq */ + 156, /* ne */ + 157, /* i_ne */ + 158, /* ncmp */ + 159, /* i_ncmp */ + 160, /* slt */ + 161, /* sgt */ + 162, /* sle */ + 163, /* sge */ + 164, /* seq */ + 165, /* sne */ + 166, /* scmp */ + 167, /* bit_and */ + 168, /* bit_xor */ + 169, /* bit_or */ + 170, /* negate */ + 171, /* i_negate */ + 173, /* not */ + 174, /* complement */ + 175, /* smartmatch */ + 176, /* atan2 */ + 178, /* sin */ + 180, /* cos */ + 182, /* rand */ + 184, /* srand */ + 186, /* exp */ + 188, /* log */ + 190, /* sqrt */ + 192, /* int */ + 194, /* hex */ + 196, /* oct */ + 198, /* abs */ + 200, /* length */ + 202, /* substr */ + 205, /* vec */ + 208, /* index */ + 210, /* rindex */ + 212, /* sprintf */ + 213, /* formline */ + 214, /* ord */ + 216, /* chr */ + 218, /* crypt */ + 220, /* ucfirst */ + 221, /* lcfirst */ + 222, /* uc */ + 223, /* lc */ + 224, /* quotemeta */ + 225, /* rv2av */ + 231, /* aelemfast */ + 232, /* aelemfast_lex */ + 233, /* aelem */ + 238, /* aslice */ + 241, /* kvaslice */ + 242, /* aeach */ + 243, /* akeys */ + 244, /* avalues */ + 245, /* each */ + 246, /* values */ + 247, /* keys */ + 249, /* delete */ + 252, /* exists */ + 254, /* rv2hv */ + 262, /* helem */ + 267, /* hslice */ + 270, /* kvhslice */ + 271, /* unpack */ + 272, /* pack */ + 273, /* split */ + 275, /* join */ + 276, /* list */ + 278, /* lslice */ + 279, /* anonlist */ + 280, /* anonhash */ + 281, /* splice */ + 282, /* push */ + 284, /* pop */ + 285, /* shift */ + 286, /* unshift */ + 288, /* sort */ + 295, /* reverse */ + 297, /* grepstart */ + 298, /* grepwhile */ + 300, /* mapstart */ + 301, /* mapwhile */ + 303, /* range */ + 304, /* flip */ + 306, /* flop */ + 308, /* and */ + 309, /* or */ + 310, /* xor */ + 311, /* dor */ + 312, /* cond_expr */ + 314, /* andassign */ + 315, /* orassign */ + 316, /* dorassign */ + 317, /* method */ + 318, /* entersub */ + 325, /* leavesub */ + 327, /* leavesublv */ + 329, /* caller */ + 331, /* warn */ + 332, /* die */ + 333, /* reset */ -1, /* lineseq */ - 332, /* nextstate */ - 335, /* dbstate */ + 334, /* nextstate */ + 337, /* dbstate */ -1, /* unstack */ -1, /* enter */ - 338, /* leave */ + 340, /* leave */ -1, /* scope */ - 340, /* enteriter */ - 344, /* iter */ + 342, /* enteriter */ + 346, /* iter */ -1, /* enterloop */ - 345, /* leaveloop */ + 347, /* leaveloop */ -1, /* return */ - 347, /* last */ - 349, /* next */ - 351, /* redo */ - 353, /* dump */ - 355, /* goto */ - 357, /* exit */ - 358, /* method_named */ - 359, /* entergiven */ - 360, /* leavegiven */ - 361, /* enterwhen */ - 362, /* leavewhen */ + 349, /* last */ + 351, /* next */ + 353, /* redo */ + 355, /* dump */ + 357, /* goto */ + 359, /* exit */ + 360, /* method_named */ + 361, /* entergiven */ + 362, /* leavegiven */ + 363, /* enterwhen */ + 364, /* leavewhen */ -1, /* break */ -1, /* continue */ - 363, /* open */ - 368, /* close */ - 369, /* pipe_op */ - 370, /* fileno */ - 371, /* umask */ - 372, /* binmode */ - 373, /* tie */ - 374, /* untie */ - 375, /* tied */ - 376, /* dbmopen */ - 377, /* dbmclose */ - 378, /* sselect */ - 379, /* select */ - 380, /* getc */ - 381, /* read */ - 382, /* enterwrite */ - 383, /* leavewrite */ + 365, /* open */ + 370, /* close */ + 371, /* pipe_op */ + 372, /* fileno */ + 373, /* umask */ + 374, /* binmode */ + 375, /* tie */ + 376, /* untie */ + 377, /* tied */ + 378, /* dbmopen */ + 379, /* dbmclose */ + 380, /* sselect */ + 381, /* select */ + 382, /* getc */ + 383, /* read */ + 384, /* enterwrite */ + 385, /* leavewrite */ -1, /* prtf */ -1, /* print */ -1, /* say */ - 385, /* sysopen */ - 386, /* sysseek */ - 387, /* sysread */ - 388, /* syswrite */ - 389, /* eof */ - 390, /* tell */ - 391, /* seek */ - 392, /* truncate */ - 393, /* fcntl */ - 394, /* ioctl */ - 395, /* flock */ - 397, /* send */ - 398, /* recv */ - 399, /* socket */ - 400, /* sockpair */ - 401, /* bind */ - 402, /* connect */ - 403, /* listen */ - 404, /* accept */ - 405, /* shutdown */ - 406, /* gsockopt */ - 407, /* ssockopt */ - 408, /* getsockname */ - 409, /* getpeername */ - 410, /* lstat */ - 411, /* stat */ - 412, /* ftrread */ - 417, /* ftrwrite */ - 422, /* ftrexec */ - 427, /* fteread */ - 432, /* ftewrite */ - 437, /* fteexec */ - 442, /* ftis */ - 446, /* ftsize */ - 450, /* ftmtime */ - 454, /* ftatime */ - 458, /* ftctime */ - 462, /* ftrowned */ - 466, /* fteowned */ - 470, /* ftzero */ - 474, /* ftsock */ - 478, /* ftchr */ - 482, /* ftblk */ - 486, /* ftfile */ - 490, /* ftdir */ - 494, /* ftpipe */ - 498, /* ftsuid */ - 502, /* ftsgid */ - 506, /* ftsvtx */ - 510, /* ftlink */ - 514, /* fttty */ - 518, /* fttext */ - 522, /* ftbinary */ - 526, /* chdir */ - 528, /* chown */ - 530, /* chroot */ - 532, /* unlink */ - 534, /* chmod */ - 536, /* utime */ - 538, /* rename */ - 540, /* link */ - 542, /* symlink */ - 544, /* readlink */ - 545, /* mkdir */ - 547, /* rmdir */ - 549, /* open_dir */ - 550, /* readdir */ - 551, /* telldir */ - 552, /* seekdir */ - 553, /* rewinddir */ - 554, /* closedir */ + 387, /* sysopen */ + 388, /* sysseek */ + 389, /* sysread */ + 390, /* syswrite */ + 391, /* eof */ + 392, /* tell */ + 393, /* seek */ + 394, /* truncate */ + 395, /* fcntl */ + 396, /* ioctl */ + 397, /* flock */ + 399, /* send */ + 400, /* recv */ + 401, /* socket */ + 402, /* sockpair */ + 403, /* bind */ + 404, /* connect */ + 405, /* listen */ + 406, /* accept */ + 407, /* shutdown */ + 408, /* gsockopt */ + 409, /* ssockopt */ + 410, /* getsockname */ + 411, /* getpeername */ + 412, /* lstat */ + 413, /* stat */ + 414, /* ftrread */ + 419, /* ftrwrite */ + 424, /* ftrexec */ + 429, /* fteread */ + 434, /* ftewrite */ + 439, /* fteexec */ + 444, /* ftis */ + 448, /* ftsize */ + 452, /* ftmtime */ + 456, /* ftatime */ + 460, /* ftctime */ + 464, /* ftrowned */ + 468, /* fteowned */ + 472, /* ftzero */ + 476, /* ftsock */ + 480, /* ftchr */ + 484, /* ftblk */ + 488, /* ftfile */ + 492, /* ftdir */ + 496, /* ftpipe */ + 500, /* ftsuid */ + 504, /* ftsgid */ + 508, /* ftsvtx */ + 512, /* ftlink */ + 516, /* fttty */ + 520, /* fttext */ + 524, /* ftbinary */ + 528, /* chdir */ + 530, /* chown */ + 532, /* chroot */ + 534, /* unlink */ + 536, /* chmod */ + 538, /* utime */ + 540, /* rename */ + 542, /* link */ + 544, /* symlink */ + 546, /* readlink */ + 547, /* mkdir */ + 549, /* rmdir */ + 551, /* open_dir */ + 552, /* readdir */ + 553, /* telldir */ + 554, /* seekdir */ + 555, /* rewinddir */ + 556, /* closedir */ -1, /* fork */ - 555, /* wait */ - 556, /* waitpid */ - 558, /* system */ - 560, /* exec */ - 562, /* kill */ - 564, /* getppid */ - 565, /* getpgrp */ - 567, /* setpgrp */ - 569, /* getpriority */ - 571, /* setpriority */ - 573, /* time */ + 557, /* wait */ + 558, /* waitpid */ + 560, /* system */ + 562, /* exec */ + 564, /* kill */ + 566, /* getppid */ + 567, /* getpgrp */ + 569, /* setpgrp */ + 571, /* getpriority */ + 573, /* setpriority */ + 575, /* time */ -1, /* tms */ - 574, /* localtime */ - 575, /* gmtime */ - 576, /* alarm */ - 577, /* sleep */ - 579, /* shmget */ - 580, /* shmctl */ - 581, /* shmread */ - 582, /* shmwrite */ - 583, /* msgget */ - 584, /* msgctl */ - 585, /* msgsnd */ - 586, /* msgrcv */ - 587, /* semop */ - 588, /* semget */ - 589, /* semctl */ - 590, /* require */ - 591, /* dofile */ + 576, /* localtime */ + 577, /* gmtime */ + 578, /* alarm */ + 579, /* sleep */ + 581, /* shmget */ + 582, /* shmctl */ + 583, /* shmread */ + 584, /* shmwrite */ + 585, /* msgget */ + 586, /* msgctl */ + 587, /* msgsnd */ + 588, /* msgrcv */ + 589, /* semop */ + 590, /* semget */ + 591, /* semctl */ + 592, /* require */ + 593, /* dofile */ -1, /* hintseval */ - 592, /* entereval */ - 598, /* leaveeval */ - 600, /* entertry */ + 594, /* entereval */ + 600, /* leaveeval */ + 602, /* entertry */ -1, /* leavetry */ - 601, /* ghbyname */ - 602, /* ghbyaddr */ + 603, /* ghbyname */ + 604, /* ghbyaddr */ -1, /* ghostent */ - 603, /* gnbyname */ - 604, /* gnbyaddr */ + 605, /* gnbyname */ + 606, /* gnbyaddr */ -1, /* gnetent */ - 605, /* gpbyname */ - 606, /* gpbynumber */ + 607, /* gpbyname */ + 608, /* gpbynumber */ -1, /* gprotoent */ - 607, /* gsbyname */ - 608, /* gsbyport */ + 609, /* gsbyname */ + 610, /* gsbyport */ -1, /* gservent */ - 609, /* shostent */ - 610, /* snetent */ - 611, /* sprotoent */ - 612, /* sservent */ + 611, /* shostent */ + 612, /* snetent */ + 613, /* sprotoent */ + 614, /* sservent */ -1, /* ehostent */ -1, /* enetent */ -1, /* eprotoent */ -1, /* eservent */ - 613, /* gpwnam */ - 614, /* gpwuid */ + 615, /* gpwnam */ + 616, /* gpwuid */ -1, /* gpwent */ -1, /* spwent */ -1, /* epwent */ - 615, /* ggrnam */ - 616, /* ggrgid */ + 617, /* ggrnam */ + 618, /* ggrgid */ -1, /* ggrent */ -1, /* sgrent */ -1, /* egrent */ -1, /* getlogin */ - 617, /* syscall */ - 618, /* lock */ - 619, /* once */ + 619, /* syscall */ + 620, /* lock */ + 621, /* once */ -1, /* custom */ - 620, /* reach */ - 621, /* rkeys */ - 623, /* rvalues */ - 624, /* coreargs */ - 628, /* runcv */ - 629, /* fc */ + 622, /* reach */ + 623, /* rkeys */ + 625, /* rvalues */ + 626, /* coreargs */ + 630, /* runcv */ + 631, /* fc */ -1, /* padcv */ -1, /* introcv */ -1, /* clonecv */ - 630, /* padrange */ - 632, /* refassign */ - 638, /* lvref */ - 644, /* lvrefslice */ - 645, /* lvavref */ + 632, /* padrange */ + 634, /* refassign */ + 640, /* lvref */ + 646, /* lvrefslice */ + 647, /* lvavref */ }; @@ -2823,7 +2823,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = { /* i_divide */ 0x3d30, 0x0067, /* modulo */ 0x3d30, 0x0067, /* i_modulo */ 0x3d30, 0x0067, - /* repeat */ 0x0f78, 0x0067, + /* repeat */ 0x0f78, 0x3d30, 0x0067, /* add */ 0x3d30, 0x0067, /* i_add */ 0x3d30, 0x0067, /* subtract */ 0x3d30, 0x0067, @@ -2875,7 +2875,7 @@ EXTCONST U16 PL_op_private_bitdefs[] = { /* abs */ 0x3d30, 0x0003, /* length */ 0x3d30, 0x0003, /* substr */ 0x3230, 0x290c, 0x00cb, - /* vec */ 0x290c, 0x0067, + /* vec */ 0x3d30, 0x290c, 0x0067, /* index */ 0x3d30, 0x012f, /* rindex */ 0x3d30, 0x012f, /* sprintf */ 0x012f, @@ -3180,7 +3180,7 @@ EXTCONST U8 PL_op_private_valid[] = { /* I_DIVIDE */ (OPpARG2_MASK|OPpTARGET_MY), /* MODULO */ (OPpARG2_MASK|OPpTARGET_MY), /* I_MODULO */ (OPpARG2_MASK|OPpTARGET_MY), - /* REPEAT */ (OPpARG2_MASK|OPpREPEAT_DOLIST), + /* REPEAT */ (OPpARG2_MASK|OPpTARGET_MY|OPpREPEAT_DOLIST), /* ADD */ (OPpARG2_MASK|OPpTARGET_MY), /* I_ADD */ (OPpARG2_MASK|OPpTARGET_MY), /* SUBTRACT */ (OPpARG2_MASK|OPpTARGET_MY), @@ -3232,7 +3232,7 @@ EXTCONST U8 PL_op_private_valid[] = { /* ABS */ (OPpARG1_MASK|OPpTARGET_MY), /* LENGTH */ (OPpARG1_MASK|OPpTARGET_MY), /* SUBSTR */ (OPpARG3_MASK|OPpMAYBE_LVSUB|OPpSUBSTR_REPL_FIRST), - /* VEC */ (OPpARG2_MASK|OPpMAYBE_LVSUB), + /* VEC */ (OPpARG2_MASK|OPpMAYBE_LVSUB|OPpTARGET_MY), /* INDEX */ (OPpARG4_MASK|OPpTARGET_MY), /* RINDEX */ (OPpARG4_MASK|OPpTARGET_MY), /* SPRINTF */ (OPpARG4_MASK), diff --git a/regen/op_private b/regen/op_private index 8d82142..a341a97 100644 --- a/regen/op_private +++ b/regen/op_private @@ -332,12 +332,10 @@ addbits($_, 7 => qw(OPpLVAL_INTRO LVINTRO)) # If the target coincides with one of the arguments ==> kaboom. # # pp.c pos substr each not OK (RETPUSHUNDEF) -# substr vec also not OK due to LV to target (are they???) # ref not OK (RETPUSHNO) # trans not OK (dTARG; TARG = sv_newmortal();) # ucfirst etc not OK: TMP arg processed inplace # quotemeta not OK (unsafe when TARG == arg) -# each repeat not OK too due to list context # pack split - unknown whether they are safe # sprintf: is calling do_sprintf(TARG,...) which can act on TARG # before other args are processed. diff --git a/regen/opcodes b/regen/opcodes index 6c3f63e..6328b0e 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -126,7 +126,7 @@ divide division (/) ck_null IfsT2 S S i_divide integer division (/) ck_null ifsT2 S S modulo modulus (%) ck_null IifsT2 S S i_modulo integer modulus (%) ck_null ifsT2 S S -repeat repeat (x) ck_repeat fmt2 L S +repeat repeat (x) ck_repeat fmT2 L S add addition (+) ck_null IfsT2 S S i_add integer addition (+) ck_null ifsT2 S S @@ -194,7 +194,7 @@ abs abs ck_fun fsTu% S? length length ck_length ifsTu% S? substr substr ck_substr st@ S S S? S? -vec vec ck_fun ist@ S S S +vec vec ck_fun isT@ S S S index index ck_index isT@ S S S? rindex rindex ck_index isT@ S S S? -- Perl5 Master Repository
