b71133245c
This delays removing dead loop's loop exits after we iterate all uses of the loop. That way, we avoid mutating the use collection while iterating it. Bug: chromium:803022 Change-Id: I17462dd82c3cb78f2f630e5db81d8ccdcc517d83 Reviewed-on: https://chromium-review.googlesource.com/878329 Reviewed-by: Michael Stanton <mvstanton@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#50813}
17 lines
363 B
JavaScript
17 lines
363 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
function foo() {
|
|
for (var a = 0; a < 2; a++) {
|
|
if (a === 1) %OptimizeOsr();
|
|
while (0 && 1) {
|
|
for (var j = 1; j < 2; j++) { }
|
|
}
|
|
}
|
|
}
|
|
|
|
foo();
|