Skip to content

Commit

Permalink
deps,v8: cherry-pick 385aa80
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
refack committed Mar 17, 2019
1 parent f105654 commit 8e308e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

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

##### V8 defaults for Node.js #####

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Alexander Botero-Lowry <[email protected]>
Alexander Karpinsky <[email protected]>
Alexandre Vassalotti <[email protected]>
Alexis Campailla <[email protected]>
Allan Sandfeld Jensen <[email protected]>
Amos Lim <[email protected]>
Andreas Anyuru <[email protected]>
Andrew Paprocki <[email protected]>
Expand Down
3 changes: 1 addition & 2 deletions deps/v8/src/compiler/backend/gap-resolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ void GapResolver::Resolve(ParallelMove* moves) {
for (auto it = moves->begin(); it != moves->end();) {
MoveOperands* move = *it;
if (move->IsRedundant()) {
*it = moves->back();
moves->pop_back();
it = moves->erase(it);
continue;
}
source_kinds.Add(GetKind(move->source()));
Expand Down

0 comments on commit 8e308e8

Please sign in to comment.