mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibJS: Add Boolean constructor object
This commit is contained in:
parent
57bd194e5a
commit
edae926cb0
Notes:
sideshowbarker
2024-07-19 07:50:30 +09:00
Author: https://github.com/jack-karamanian
Commit: edae926cb0
Pull-request: https://github.com/SerenityOS/serenity/pull/1682
Reviewed-by: https://github.com/bgianfo
16 changed files with 400 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <LibJS/AST.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/ArrayPrototype.h>
|
||||
#include <LibJS/Runtime/BooleanPrototype.h>
|
||||
#include <LibJS/Runtime/DatePrototype.h>
|
||||
#include <LibJS/Runtime/Error.h>
|
||||
#include <LibJS/Runtime/ErrorPrototype.h>
|
||||
|
@ -55,6 +56,7 @@ Interpreter::Interpreter()
|
|||
m_error_prototype = heap().allocate<ErrorPrototype>();
|
||||
m_date_prototype = heap().allocate<DatePrototype>();
|
||||
m_number_prototype = heap().allocate<NumberPrototype>();
|
||||
m_boolean_prototype = heap().allocate<BooleanPrototype>();
|
||||
}
|
||||
|
||||
Interpreter::~Interpreter()
|
||||
|
@ -180,6 +182,7 @@ void Interpreter::gather_roots(Badge<Heap>, HashTable<Cell*>& roots)
|
|||
roots.set(m_date_prototype);
|
||||
roots.set(m_function_prototype);
|
||||
roots.set(m_number_prototype);
|
||||
roots.set(m_boolean_prototype);
|
||||
|
||||
roots.set(m_exception);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue