1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-30 10:12:07 +00:00

LibJS: Pass prototype to Function constructors

This commit is contained in:
Andreas Kling 2020-04-17 19:59:32 +02:00
parent 205ac0090d
commit f6d57c82f6
21 changed files with 66 additions and 24 deletions

View file

@ -54,6 +54,9 @@ Interpreter::Interpreter()
m_object_prototype = heap().allocate<ObjectPrototype>();
m_function_prototype = heap().allocate<FunctionPrototype>();
static_cast<FunctionPrototype*>(m_function_prototype)->initialize();
static_cast<ObjectPrototype*>(m_object_prototype)->initialize();
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
if (!m_##snake_name##_prototype) \
m_##snake_name##_prototype = heap().allocate<PrototypeName>();