summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Interpreter.cpp
diff options
context:
space:
mode:
authorJack Karamanian <karamanian.jack@gmail.com>2020-04-06 22:51:16 -0500
committerAndreas Kling <kling@serenityos.org>2020-04-07 08:41:25 +0200
commitedae926cb01cee1a110ac52052346bcf3649d07c (patch)
tree9139622f572ade2c80fef2d073309cebdf10b0d4 /Libraries/LibJS/Interpreter.cpp
parent57bd194e5a11ae6bc8477eb976fb7d2c1e10ac35 (diff)
downloadserenity-edae926cb01cee1a110ac52052346bcf3649d07c.zip
LibJS: Add Boolean constructor object
Diffstat (limited to 'Libraries/LibJS/Interpreter.cpp')
-rw-r--r--Libraries/LibJS/Interpreter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp
index b8dbad53c3..910751cf7e 100644
--- a/Libraries/LibJS/Interpreter.cpp
+++ b/Libraries/LibJS/Interpreter.cpp
@@ -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);