diff options
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 4f9815826b..b3eba3c84b 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -71,7 +71,6 @@ Codegen::ScanFunctions::ScanFunctions(Codegen *cg, const QString &sourceCode) : _cg(cg) , _sourceCode(sourceCode) , _env(0) - , _inFuncBody(false) , _allowFuncDecls(true) { } @@ -298,13 +297,6 @@ void Codegen::ScanFunctions::endVisit(FunctionDeclaration *) leaveEnvironment(); } -bool Codegen::ScanFunctions::visit(FunctionBody *ast) -{ - TemporaryBoolAssignment inFuncBody(_inFuncBody, true); - Node::accept(ast->elements, this); - return false; -} - bool Codegen::ScanFunctions::visit(WithStatement *ast) { if (_env->isStrict) { @@ -315,25 +307,6 @@ bool Codegen::ScanFunctions::visit(WithStatement *ast) return true; } -bool Codegen::ScanFunctions::visit(IfStatement *ast) { - Node::accept(ast->expression, this); - - TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_inFuncBody); - Node::accept(ast->ok, this); - Node::accept(ast->ko, this); - - return false; -} - -bool Codegen::ScanFunctions::visit(WhileStatement *ast) { - Node::accept(ast->expression, this); - - TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_inFuncBody); - Node::accept(ast->statement, this); - - return false; -} - bool Codegen::ScanFunctions::visit(DoWhileStatement *ast) { { TemporaryBoolAssignment allowFuncDecls(_allowFuncDecls, !_env->isStrict); |