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:
parent
581f20e6f2
commit
e2e695bc9f
5 changed files with 22 additions and 7 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue