v8/test/mjsunit/regress/regress-crbug-820820.js
Benedikt Meurer 022e1a5f94 [turbofan] Properly deal with killed nodes in LoadElimination.
Depending on visitation order the LoadElimination might be find memoized
nodes in its state tables that were killed by other reducers in the mean
time. The LoadElimination must just ignore those stale entries.

Bug: chromium:820820
Change-Id: Ia62e401ff77da547ed215a14074e70aeb5c3a766
Reviewed-on: https://chromium-review.googlesource.com/958843
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51892}
2018-03-13 06:27:13 +00:00

24 lines
500 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* generator() {
yield undefined;
}
function bar(x) {
const objects = [];
for (let obj of generator()) {
}
return objects[0];
}
function foo() {
try { undefined[0] = bar(); } catch (e) { }
Math.min(bar(), bar(), bar());
}
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();