mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:05:06 +00:00
LibJS: Add the Set built-in object
This commit is contained in:
parent
b17a282b4b
commit
670be04c81
15 changed files with 359 additions and 30 deletions
|
@ -47,6 +47,8 @@
|
|||
#include <LibJS/Runtime/ReflectObject.h>
|
||||
#include <LibJS/Runtime/RegExpConstructor.h>
|
||||
#include <LibJS/Runtime/RegExpPrototype.h>
|
||||
#include <LibJS/Runtime/SetConstructor.h>
|
||||
#include <LibJS/Runtime/SetPrototype.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
#include <LibJS/Runtime/StringConstructor.h>
|
||||
#include <LibJS/Runtime/StringIteratorPrototype.h>
|
||||
|
@ -87,7 +89,7 @@ void GlobalObject::initialize_global_object()
|
|||
static_cast<FunctionPrototype*>(m_function_prototype)->initialize(*this);
|
||||
static_cast<ObjectPrototype*>(m_object_prototype)->initialize(*this);
|
||||
|
||||
set_prototype(m_object_prototype);
|
||||
Object::set_prototype(m_object_prototype);
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
|
||||
if (!m_##snake_name##_prototype) \
|
||||
|
@ -137,6 +139,7 @@ void GlobalObject::initialize_global_object()
|
|||
add_constructor(vm.names.Promise, m_promise_constructor, m_promise_prototype);
|
||||
add_constructor(vm.names.Proxy, m_proxy_constructor, nullptr);
|
||||
add_constructor(vm.names.RegExp, m_regexp_constructor, m_regexp_prototype);
|
||||
add_constructor(vm.names.Set, m_set_constructor, m_set_prototype);
|
||||
add_constructor(vm.names.String, m_string_constructor, m_string_prototype);
|
||||
add_constructor(vm.names.Symbol, m_symbol_constructor, m_symbol_prototype);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue