From 020ad3d259f57c379fbcdd4e69c235dd1b0a3774 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 31 Aug 2017 15:35:20 +0200 Subject: Get rid of the hack for named expressions Instead simply use the pointer to the FunctionObject we have in the CallData now. Change-Id: I6d7ed8af22e89e0217bef427110611b661ac7965 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compilerscanfunctions_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qml/compiler/qv4compilerscanfunctions_p.h') diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h index d3588ecfed..0b898e587d 100644 --- a/src/qml/compiler/qv4compilerscanfunctions_p.h +++ b/src/qml/compiler/qv4compilerscanfunctions_p.h @@ -88,10 +88,10 @@ public: void leaveEnvironment(); void enterQmlScope(AST::Node *ast, const QString &name) - { enterFunction(ast, name, /*formals*/0, /*body*/0, /*expr*/0, /*isExpression*/false); } + { enterFunction(ast, name, /*formals*/0, /*body*/0, /*expr*/0); } void enterQmlFunction(AST::FunctionDeclaration *ast) - { enterFunction(ast, false, false); } + { enterFunction(ast, false); } protected: using Visitor::visit; @@ -113,7 +113,7 @@ protected: bool visit(AST::ExpressionStatement *ast) override; bool visit(AST::FunctionExpression *ast) override; - void enterFunction(AST::FunctionExpression *ast, bool enterName, bool isExpression = true); + void enterFunction(AST::FunctionExpression *ast, bool enterName); void endVisit(AST::FunctionExpression *) override; @@ -138,7 +138,7 @@ protected: bool visit(AST::Block *ast) override; protected: - void enterFunction(AST::Node *ast, const QString &name, AST::FormalParameterList *formals, AST::FunctionBody *body, AST::FunctionExpression *expr, bool isExpression); + void enterFunction(AST::Node *ast, const QString &name, AST::FormalParameterList *formals, AST::FunctionBody *body, AST::FunctionExpression *expr); void calcEscapingVariables(); // fields: -- cgit v1.2.3