summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2019-03-16 10:44:59 -0400
committerRefael Ackermann <refack@gmail.com>2019-03-17 09:28:01 -0400
commit8e308e8b2804344768037b5764328cf5cfdfaade (patch)
treed544d267456740c72934168cc62f36ddcd46b9c1 /deps
parentf1056542f0cf2520e122d93afbaada6b6599e49b (diff)
downloadandroid-node-v8-8e308e8b2804344768037b5764328cf5cfdfaade.tar.gz
android-node-v8-8e308e8b2804344768037b5764328cf5cfdfaade.tar.bz2
android-node-v8-8e308e8b2804344768037b5764328cf5cfdfaade.zip
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 <titzer@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#59868} Refs: https://github.com/v8/v8/commit/385aa80aff32210d098498d1cd44d42bc70ee1d4 PR-URL: https://github.com/nodejs/node/pull/26702 Fixes: https://github.com/nodejs/node/issues/26694 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/AUTHORS1
-rw-r--r--deps/v8/src/compiler/backend/gap-resolver.cc3
2 files changed, 2 insertions, 2 deletions
diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS
index bea5f9ae85..ecf0e5d1fb 100644
--- a/deps/v8/AUTHORS
+++ b/deps/v8/AUTHORS
@@ -46,6 +46,7 @@ Alexander Botero-Lowry <alexbl@FreeBSD.org>
Alexander Karpinsky <homm86@gmail.com>
Alexandre Vassalotti <avassalotti@gmail.com>
Alexis Campailla <alexis@janeasystems.com>
+Allan Sandfeld Jensen <allan.jensen@qt.io>
Amos Lim <eui-sang.lim@samsung.com>
Andreas Anyuru <andreas.anyuru@gmail.com>
Andrew Paprocki <andrew@ishiboo.com>
diff --git a/deps/v8/src/compiler/backend/gap-resolver.cc b/deps/v8/src/compiler/backend/gap-resolver.cc
index 6cb7d7fbaf..1758ca2c5a 100644
--- a/deps/v8/src/compiler/backend/gap-resolver.cc
+++ b/deps/v8/src/compiler/backend/gap-resolver.cc
@@ -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()));