Commit 6dee1ac1 authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

[bigint] Fix asIntN/asUintN for n == kMaxLengthBits

And also ensure that it doesn't allocate when that's avoidable.

Bug: v8:6791
Change-Id: Ied2d2c9c5718aed9839f17739d743353cbadee88
Reviewed-on: https://chromium-review.googlesource.com/786170Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49683}
parent dbe3362d
......@@ -77,7 +77,7 @@ BUILTIN(BigIntAsUintN) {
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, bigint,
BigInt::FromObject(isolate, bigint_obj));
return *BigInt::AsUintN(bits->Number(), bigint);
RETURN_RESULT_OR_FAILURE(isolate, BigInt::AsUintN(bits->Number(), bigint));
}
BUILTIN(BigIntAsIntN) {
......
This diff is collapsed.
......@@ -138,7 +138,7 @@ class V8_EXPORT_PRIVATE BigInt : public BigIntBase {
static ComparisonResult CompareToDouble(Handle<BigInt> x, double y);
static Handle<BigInt> AsIntN(uint64_t n, Handle<BigInt> x);
static Handle<BigInt> AsUintN(uint64_t n, Handle<BigInt> x);
static MaybeHandle<BigInt> AsUintN(uint64_t n, Handle<BigInt> x);
DECL_CAST(BigInt)
DECL_VERIFIER(BigInt)
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment