1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

LibJS: Convert BigIntConstructor functions to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-29 00:13:55 +03:00
parent ac856cb965
commit 4128f95903
2 changed files with 6 additions and 6 deletions

View file

@ -29,8 +29,8 @@ void BigIntConstructor::initialize(GlobalObject& global_object)
// TODO: Implement these functions below and uncomment this. // TODO: Implement these functions below and uncomment this.
// u8 attr = Attribute::Writable | Attribute::Configurable; // u8 attr = Attribute::Writable | Attribute::Configurable;
// define_old_native_function(vm.names.asIntN, as_int_n, 2, attr); // define_native_function(vm.names.asIntN, as_int_n, 2, attr);
// define_old_native_function(vm.names.asUintN, as_uint_n, 2, attr); // define_native_function(vm.names.asUintN, as_uint_n, 2, attr);
define_direct_property(vm.names.length, Value(1), Attribute::Configurable); define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
} }
@ -65,13 +65,13 @@ ThrowCompletionOr<Object*> BigIntConstructor::construct(FunctionObject&)
} }
// 21.2.2.1 BigInt.asIntN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asintn // 21.2.2.1 BigInt.asIntN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asintn
JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_int_n) JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_int_n)
{ {
TODO(); TODO();
} }
// 21.2.2.2 BigInt.asUintN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asuintn // 21.2.2.2 BigInt.asUintN ( bits, bigint ), https://tc39.es/ecma262/#sec-bigint.asuintn
JS_DEFINE_OLD_NATIVE_FUNCTION(BigIntConstructor::as_uint_n) JS_DEFINE_NATIVE_FUNCTION(BigIntConstructor::as_uint_n)
{ {
TODO(); TODO();
} }

View file

@ -24,8 +24,8 @@ public:
private: private:
virtual bool has_constructor() const override { return true; } virtual bool has_constructor() const override { return true; }
JS_DECLARE_OLD_NATIVE_FUNCTION(as_int_n); JS_DECLARE_NATIVE_FUNCTION(as_int_n);
JS_DECLARE_OLD_NATIVE_FUNCTION(as_uint_n); JS_DECLARE_NATIVE_FUNCTION(as_uint_n);
}; };
} }