summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorRichard Leach <richardleach@users.noreply.github.com>2022-09-21 20:46:18 +0000
committerRichard Leach <richardleach@users.noreply.github.com>2022-10-22 15:28:36 +0100
commit9e99fbb3940bfab6ce2638107363e928bcca917a (patch)
tree031cfd9a2eb75b416082dc6a7f6378f7cd21e9a4 /t/perf
parentcd0eaede3642d9d687128d1ad1a699d94a1088e8 (diff)
downloadperl-9e99fbb3940bfab6ce2638107363e928bcca917a.tar.gz
AELEMFASTLEX_STORE - support negative keys, skip unnecessary check
This commit: * Adds support for negative keys, as per the original AELEMFAST_LEX * Changes an if() check for a "useless assignment to a temporary" into an assert, since this condition should never be true when the LHS is the result of an array fetch.
Diffstat (limited to 't/perf')
-rw-r--r--t/perf/opcount.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/perf/opcount.t b/t/perf/opcount.t
index ffb878220e..cca8dec397 100644
--- a/t/perf/opcount.t
+++ b/t/perf/opcount.t
@@ -898,13 +898,13 @@ test_opcount(0, "simple aelemfast_lex + sassign replacement",
# aelemfast_lex + sassign are not replaced by a combined OP
# when key <0 (not handled, to keep the pp_ function simple
-test_opcount(0, "no aelemfast_lex + sassign replacement with neg key",
+test_opcount(0, "aelemfast_lex + sassign replacement with neg key",
sub { my @x = (1,2); $x[-1] = 7 },
{
- aelemfast_lex => 1,
- aelemfastlex_store => 0,
+ aelemfast_lex => 0,
+ aelemfastlex_store => 1,
padav => 1,
- sassign => 1,
+ sassign => 0,
});
# aelemfast_lex + sassign optimization does not disrupt multideref