9d51166419
Taking kSystemPointerSize into account when determining the maximum allowed BigInt size accidentally made the limit platform-specific. This patch chooses a platform-independent constant (1<<30) instead. Bug: chromium:909614 Change-Id: I4717969bc56e6dd5f1eed70b7e60e621989d0719 Reviewed-on: https://chromium-review.googlesource.com/c/1355625 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#57983}
10 lines
346 B
JavaScript
10 lines
346 B
JavaScript
// Copyright 2018 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.
|
|
|
|
let just_under = 2n ** 30n - 1n;
|
|
let just_above = 2n ** 30n;
|
|
|
|
assertDoesNotThrow(() => { var dummy = 2n ** just_under; });
|
|
assertThrows(() => { var dummy = 2n ** just_above; });
|