a99ca6e6cb
A previous CL removed the kNoThrow flags from both SpeculativeBigIntAdd and SpeculativeBigIntSubtract. This introduced a bug, because the JSTypeHintLowering phase, where these operators are introduced during inlining, does not support the generation of throwing operators. Since these operators always deoptimize in case of an error, instead of throwing the exception directly, it is safe to mark them as kNoThrow. Bug: chromium:1091461 No-Try: true No-Tree-Checks: true Change-Id: I551616b0c462647574e5af8824d9ed7b3252659d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235113 Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#68254}
22 lines
441 B
JavaScript
22 lines
441 B
JavaScript
// Copyright 2020 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(a, b) {
|
|
let x = a + b;
|
|
}
|
|
function test() {
|
|
try {
|
|
foo(1n, 1n);
|
|
} catch (e) {}
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
%PrepareFunctionForOptimization(test);
|
|
test();
|
|
test();
|
|
%OptimizeFunctionOnNextCall(test);
|
|
test();
|