LibJS: Track whether ScriptFunctions and FunctionExpressions are arrow

functions
This commit is contained in:
Jack Karamanian 2020-05-30 00:10:42 -05:00 committed by Andreas Kling
commit c12125fa81
Notes: sideshowbarker 2024-07-19 05:58:30 +09:00
5 changed files with 13 additions and 8 deletions

View file

@ -76,7 +76,7 @@ Value FunctionDeclaration::execute(Interpreter& interpreter) const
Value FunctionExpression::execute(Interpreter& interpreter) const
{
return ScriptFunction::create(interpreter.global_object(), name(), body(), parameters(), function_length(), interpreter.current_environment());
return ScriptFunction::create(interpreter.global_object(), name(), body(), parameters(), function_length(), interpreter.current_environment(), m_is_arrow_function);
}
Value ExpressionStatement::execute(Interpreter& interpreter) const