mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibJS: Port Value::to_bigint() to NonnullGCPtr
This commit is contained in:
parent
f345f72b55
commit
9279b0780d
5 changed files with 19 additions and 19 deletions
|
@ -69,7 +69,7 @@ JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
|
|||
auto bits = TRY(vm.argument(0).to_index(vm));
|
||||
|
||||
// 2. Set bigint to ? ToBigInt(bigint).
|
||||
auto* bigint = TRY(vm.argument(1).to_bigint(vm));
|
||||
auto bigint = TRY(vm.argument(1).to_bigint(vm));
|
||||
|
||||
// 3. Let mod be ℝ(bigint) modulo 2^bits.
|
||||
// FIXME: For large values of `bits`, this can likely be improved with a SignedBigInteger API to
|
||||
|
@ -95,7 +95,7 @@ JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
|
|||
auto bits = TRY(vm.argument(0).to_index(vm));
|
||||
|
||||
// 2. Set bigint to ? ToBigInt(bigint).
|
||||
auto* bigint = TRY(vm.argument(1).to_bigint(vm));
|
||||
auto bigint = TRY(vm.argument(1).to_bigint(vm));
|
||||
|
||||
// 3. Return the BigInt value that represents ℝ(bigint) modulo 2bits.
|
||||
// FIXME: For large values of `bits`, this can likely be improved with a SignedBigInteger API to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue