ea1bac5386
All IFS values of resumable loops are loop phis, so values from before the loop can safely be dropped. In fact, if we don't drop them we might not be able to restore them and crash in a safety check. Eagerly dropping the values allows us to keep the safety check. Bug: v8:7700 Change-Id: I99ef80e35db5aba965dc1c5c9d78f1d085e589fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110940 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#84943}
18 lines
444 B
JavaScript
18 lines
444 B
JavaScript
// Copyright 2022 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 --maglev
|
|
|
|
(function () {
|
|
async function foo() {
|
|
for (let i = 0; i == 1; i++) {
|
|
780109, { get: function() { } }; await 7;
|
|
}
|
|
}
|
|
%PrepareFunctionForOptimization(foo);
|
|
foo();
|
|
%OptimizeMaglevOnNextCall(foo);
|
|
foo();
|
|
})();
|