LibJS: Move "strict mode" state to the call stack

Each call frame now knows whether it's executing in strict mode.
It's no longer necessary to access the scope stack to find this mode.
This commit is contained in:
Andreas Kling 2020-10-04 13:54:44 +02:00
commit a007b3c379
Notes: sideshowbarker 2024-07-19 02:04:33 +09:00
15 changed files with 49 additions and 37 deletions

View file

@ -64,6 +64,8 @@ public:
ConstructorKind constructor_kind() const { return m_constructor_kind; };
void set_constructor_kind(ConstructorKind constructor_kind) { m_constructor_kind = constructor_kind; }
virtual bool is_strict_mode() const { return false; }
protected:
explicit Function(Object& prototype);
Function(Object& prototype, Value bound_this, Vector<Value> bound_arguments);