Commit 2d21b6e9 authored by Nico Hartmann's avatar Nico Hartmann Committed by Commit Bot

Replace ToBoolean's runtime call for BigInt by CSA code

Bug: v8:9213
Change-Id: If1299bb11a238b7732dde6931a79b991119cec2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1596730Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@google.com>
Cr-Commit-Position: refs/heads/master@{#61335}
parent ad010efa
...@@ -1353,10 +1353,10 @@ void CodeStubAssembler::BranchIfToBooleanIsTrue(Node* value, Label* if_true, ...@@ -1353,10 +1353,10 @@ void CodeStubAssembler::BranchIfToBooleanIsTrue(Node* value, Label* if_true,
BIND(&if_bigint); BIND(&if_bigint);
{ {
Node* result = TNode<BigInt> bigint = CAST(value);
CallRuntime(Runtime::kBigIntToBoolean, NoContextConstant(), value); TNode<Word32T> bitfield = LoadBigIntBitfield(bigint);
CSA_ASSERT(this, IsBoolean(result)); TNode<Uint32T> length = DecodeWord32<BigIntBase::LengthBits>(bitfield);
Branch(WordEqual(result, TrueConstant()), if_true, if_false); Branch(Word32Equal(length, Int32Constant(0)), if_false, if_true);
} }
} }
} }
......
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