LibJS: Add Boolean constructor object

This commit is contained in:
Jack Karamanian 2020-04-06 22:51:16 -05:00 committed by Andreas Kling
parent 57bd194e5a
commit edae926cb0
Notes: sideshowbarker 2024-07-19 07:50:30 +09:00
16 changed files with 400 additions and 0 deletions

View file

@ -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);