1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

LibJS: Add and use the %ThrowTypeError% intrinsic

This commit is contained in:
Idan Horowitz 2021-06-28 03:53:35 +03:00 committed by Linus Groh
parent 581f20e6f2
commit e2e695bc9f
5 changed files with 22 additions and 7 deletions

View file

@ -38,6 +38,8 @@ public:
FunctionObject* eval_function() const { return m_eval_function; }
FunctionObject* throw_type_error_function() const { return m_throw_type_error_function; }
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
ConstructorName* snake_name##_constructor() { return m_##snake_name##_constructor; } \
Object* snake_name##_prototype() { return m_##snake_name##_prototype; }
@ -99,6 +101,7 @@ private:
#undef __JS_ENUMERATE
FunctionObject* m_eval_function;
FunctionObject* m_throw_type_error_function;
};
template<typename ConstructorType>