c27adbd631
This CL fixes two bugs: - The monotonicity violation in the typers of ToBigIntConvertNumber and Integral32OrMinusZeroToBigInt. - The missing handling of conversion from Tagged output with the type DoubleRepresentableInt64OrMinusZero to Word64. Bug: v8:9407, v8:13580, chromium:1399951, chromium:1400053 Change-Id: I669820b52e5b82bddc9853cfd97a2361c344a2cb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096990 Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Qifan Pan <panq@google.com> Cr-Commit-Position: refs/heads/main@{#84793}
25 lines
569 B
JavaScript
25 lines
569 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 --no-always-turbofan
|
|
|
|
function foo(x) {
|
|
return BigInt(x);
|
|
}
|
|
|
|
function bar() {
|
|
for (let i = 0; i < 1; ++i) {
|
|
// The empty closure weakens the range of {i} to infinity in several
|
|
// iterations.
|
|
function t() { }
|
|
foo(i);
|
|
}
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
%PrepareFunctionForOptimization(bar);
|
|
bar();
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
bar();
|