summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-12 13:55:19 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-15 13:16:14 +0100
commit1b97c612e6228bd9c89ad57a922eebf6d44c9bf9 (patch)
treec55e540caad0e299d71fa01949443699e2393072
parent42674114127436564cf4598d54f671d46c1427b5 (diff)
downloadqtdeclarative-1b97c612e6228bd9c89ad57a922eebf6d44c9bf9.tar.gz
Remove ExecutionContext from the Runtime codegenerator
Change-Id: Ic62ae1cbd24c0089e0df6bc6758d262cf49d0b91 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/compiler/qv4codegen.cpp4
-rw-r--r--src/qml/compiler/qv4codegen_p.h10
-rw-r--r--src/qml/compiler/qv4compileddata_p.h1
-rw-r--r--src/qml/compiler/qv4jsir_p.h4
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
6 files changed, 7 insertions, 16 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index c66202262b..bb27d897a6 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2861,7 +2861,7 @@ void RuntimeCodegen::throwSyntaxError(const AST::SourceLocation &loc, const QStr
if (hasError)
return;
hasError = true;
- context->engine()->throwSyntaxError(detail, _module->fileName, loc.startLine, loc.startColumn);
+ engine->throwSyntaxError(detail, _module->fileName, loc.startLine, loc.startColumn);
}
void RuntimeCodegen::throwReferenceError(const AST::SourceLocation &loc, const QString &detail)
@@ -2869,7 +2869,7 @@ void RuntimeCodegen::throwReferenceError(const AST::SourceLocation &loc, const Q
if (hasError)
return;
hasError = true;
- context->engine()->throwReferenceError(detail, _module->fileName, loc.startLine, loc.startColumn);
+ engine->throwReferenceError(detail, _module->fileName, loc.startLine, loc.startColumn);
}
#endif // V4_BOOTSTRAP
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 323cd27aa9..8f528df7a1 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -47,10 +47,6 @@
QT_BEGIN_NAMESPACE
-namespace QV4 {
-struct ExecutionContext;
-}
-
namespace QQmlJS {
namespace AST {
class UiParameterList;
@@ -526,15 +522,15 @@ protected:
class RuntimeCodegen : public Codegen
{
public:
- RuntimeCodegen(QV4::ExecutionContext *ctx, bool strict)
+ RuntimeCodegen(QV4::ExecutionEngine *engine, bool strict)
: Codegen(strict)
- , context(ctx)
+ , engine(engine)
{}
virtual void throwSyntaxError(const AST::SourceLocation &loc, const QString &detail);
virtual void throwReferenceError(const AST::SourceLocation &loc, const QString &detail);
private:
- QV4::ExecutionContext *context;
+ QV4::ExecutionEngine *engine;
};
#endif // V4_BOOTSTRAP
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 6ab7191358..2e8e43dda7 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -53,7 +53,6 @@ struct Function;
}
struct Function;
-struct ExecutionContext;
namespace CompiledData {
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 66528e8bc1..aa1d579b35 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -70,10 +70,6 @@ class QQmlPropertyCache;
class QQmlEnginePrivate;
namespace QV4 {
-struct ExecutionContext;
-}
-
-namespace QV4 {
inline bool isNegative(double d)
{
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 34fe17d0eb..410be02639 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -239,7 +239,7 @@ ReturnedValue FunctionCtor::construct(Managed *that, CallData *callData)
IR::Module module(v4->debugger != 0);
- QQmlJS::RuntimeCodegen cg(v4->currentContext(), f->strictMode());
+ QQmlJS::RuntimeCodegen cg(v4, f->strictMode());
cg.generateFromFunctionExpression(QString(), function, fe, &module);
QV4::Compiler::JSUnitGenerator jsGenerator(&module);
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index e261cda414..e7bfed633b 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -266,7 +266,7 @@ void Script::parse()
}
}
- RuntimeCodegen cg(scope, strictMode);
+ RuntimeCodegen cg(v4, strictMode);
cg.generateFromProgram(sourceFile, sourceCode, program, &module, QQmlJS::Codegen::EvalCode, inheritedLocals);
if (v4->hasException)
return;