Skip to content

Commit 8e308e8

Browse files
committed
deps,v8: cherry-pick 385aa80
Original commit message: Correct removal of redundant moves The logic for removing while iterating is non-standard and a left over from a previous index based loop. This patch replaces it with a standard erase based version. This fixes a runtime crash with MSVC that invalidates the iterator and then asserts. This also makes the code safe in case the last move can be redundant. Change-Id: Ie6990e0d65a3b83a4b7da3e2e89ed4e60a6cd215 Reviewed-on: https://chromium-review.googlesource.com/c/1488762 Reviewed-by: Ben Titzer <[email protected]> Commit-Queue: Ben Titzer <[email protected]> Cr-Commit-Position: refs/heads/master@{#59868} Refs: v8/v8@385aa80 PR-URL: #26702 Fixes: #26694 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent f105654 commit 8e308e8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Reset this number to 0 on major V8 upgrades.
3939
# Increment by one for each non-official patch applied to deps/v8.
40-
'v8_embedder_string': '-node.6',
40+
'v8_embedder_string': '-node.7',
4141

4242
##### V8 defaults for Node.js #####
4343

deps/v8/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Alexander Botero-Lowry <[email protected]>
4646
Alexander Karpinsky <[email protected]>
4747
Alexandre Vassalotti <[email protected]>
4848
Alexis Campailla <[email protected]>
49+
Allan Sandfeld Jensen <[email protected]>
4950
5051
Andreas Anyuru <[email protected]>
5152
Andrew Paprocki <[email protected]>

deps/v8/src/compiler/backend/gap-resolver.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ void GapResolver::Resolve(ParallelMove* moves) {
9696
for (auto it = moves->begin(); it != moves->end();) {
9797
MoveOperands* move = *it;
9898
if (move->IsRedundant()) {
99-
*it = moves->back();
100-
moves->pop_back();
99+
it = moves->erase(it);
101100
continue;
102101
}
103102
source_kinds.Add(GetKind(move->source()));

0 commit comments

Comments
 (0)