ab2ebc296e
RepresentationChanger::GetTaggedPointerRepresentation did not handle kCompressed cases correctly for BigInts. This led to a crash of BigInt benchmarks in js-perf-test. Bug: v8:9407 Change-Id: Id1d60a81afc528c8d4180bd5de9d237f2f0abd0a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701848 Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#62718}
27 lines
497 B
JavaScript
27 lines
497 B
JavaScript
// Copyright 2019 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
|
|
{
|
|
let a = 0n;
|
|
a = 3n;
|
|
|
|
function TestAdd() {
|
|
let sum = 0n;
|
|
|
|
for (let i = 0; i < 3; ++i) {
|
|
sum = a + sum;
|
|
}
|
|
|
|
return sum;
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(TestAdd);
|
|
TestAdd();
|
|
TestAdd();
|
|
%OptimizeFunctionOnNextCall(TestAdd);
|
|
TestAdd();
|
|
TestAdd();
|
|
}
|