mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
LibJS: Add missing ECMA-262 section/title/URL comments to Map
This commit is contained in:
parent
f32ab73acc
commit
920b4d730e
2 changed files with 5 additions and 0 deletions
|
@ -21,7 +21,10 @@ void MapConstructor::initialize(GlobalObject& global_object)
|
||||||
{
|
{
|
||||||
auto& vm = this->vm();
|
auto& vm = this->vm();
|
||||||
NativeFunction::initialize(global_object);
|
NativeFunction::initialize(global_object);
|
||||||
|
|
||||||
|
// 24.1.2.1 Map.prototype, https://tc39.es/ecma262/#sec-map.prototype
|
||||||
define_property(vm.names.prototype, global_object.map_prototype(), 0);
|
define_property(vm.names.prototype, global_object.map_prototype(), 0);
|
||||||
|
|
||||||
define_property(vm.names.length, Value(0), Attribute::Configurable);
|
define_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||||
|
|
||||||
define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||||
|
@ -31,6 +34,7 @@ MapConstructor::~MapConstructor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 24.1.1.1 Map ( [ iterable ] ), https://tc39.es/ecma262/#sec-map-iterable
|
||||||
Value MapConstructor::call()
|
Value MapConstructor::call()
|
||||||
{
|
{
|
||||||
auto& vm = this->vm();
|
auto& vm = this->vm();
|
||||||
|
|
|
@ -31,6 +31,7 @@ MapIteratorPrototype::~MapIteratorPrototype()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 24.1.5.2.1 %MapIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%mapiteratorprototype%.next
|
||||||
JS_DEFINE_NATIVE_FUNCTION(MapIteratorPrototype::next)
|
JS_DEFINE_NATIVE_FUNCTION(MapIteratorPrototype::next)
|
||||||
{
|
{
|
||||||
auto this_value = vm.this_value(global_object);
|
auto this_value = vm.this_value(global_object);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue