summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ScriptFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ScriptFunction.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ScriptFunction.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ScriptFunction.h b/Userland/Libraries/LibJS/Runtime/ScriptFunction.h
index edc748130b..fa93085e5d 100644
--- a/Userland/Libraries/LibJS/Runtime/ScriptFunction.h
+++ b/Userland/Libraries/LibJS/Runtime/ScriptFunction.h
@@ -16,9 +16,9 @@ class ScriptFunction final : public Function {
JS_OBJECT(ScriptFunction, Function);
public:
- static ScriptFunction* create(GlobalObject&, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, ScopeObject* parent_scope, bool is_strict, bool is_arrow_function = false);
+ static ScriptFunction* create(GlobalObject&, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, ScopeObject* parent_scope, bool is_generator, bool is_strict, bool is_arrow_function = false);
- ScriptFunction(GlobalObject&, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, ScopeObject* parent_scope, Object& prototype, bool is_strict, bool is_arrow_function = false);
+ ScriptFunction(GlobalObject&, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, ScopeObject* parent_scope, Object& prototype, bool is_generator, bool is_strict, bool is_arrow_function = false);
virtual void initialize(GlobalObject&) override;
virtual ~ScriptFunction();
@@ -33,6 +33,8 @@ public:
void set_is_class_constructor() { m_is_class_constructor = true; };
+ auto& bytecode_executable() const { return m_bytecode_executable; }
+
protected:
virtual bool is_strict_mode() const final { return m_is_strict; }
@@ -51,6 +53,7 @@ private:
Optional<Bytecode::Executable> m_bytecode_executable;
ScopeObject* m_parent_scope { nullptr };
i32 m_function_length { 0 };
+ bool m_is_generator { false };
bool m_is_strict { false };
bool m_is_arrow_function { false };
bool m_is_class_constructor { false };