mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibJS: Add spec comments to Value::to_bigint_uint64()
This commit is contained in:
parent
fb5256b225
commit
7abd9efe33
1 changed files with 4 additions and 0 deletions
|
@ -837,7 +837,11 @@ ThrowCompletionOr<i64> Value::to_bigint_int64(VM& vm) const
|
|||
// 7.1.16 ToBigUint64 ( argument ), https://tc39.es/ecma262/#sec-tobiguint64
|
||||
ThrowCompletionOr<u64> Value::to_bigint_uint64(VM& vm) const
|
||||
{
|
||||
// 1. Let n be ? ToBigInt(argument).
|
||||
auto* bigint = TRY(to_bigint(vm));
|
||||
|
||||
// 2. Let int64bit be ℝ(n) modulo 2^64.
|
||||
// 3. Return ℤ(int64bit).
|
||||
return bigint->big_integer().to_u64();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue