c9f69db900
Bug: chromium:1254191, v8:9407 Change-Id: Ieb22063dad1ea8dfde359662d0330e689b6b2e05 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3193547 Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#77177}
19 lines
394 B
JavaScript
19 lines
394 B
JavaScript
// Copyright 2021 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 --opt
|
|
|
|
function f(a) {
|
|
let x = -1n;
|
|
if (!a) {
|
|
x = a;
|
|
}
|
|
x|0;
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(f);
|
|
f(false);
|
|
%OptimizeFunctionOnNextCall(f);
|
|
assertThrows(() => f(true), TypeError);
|