diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 4 | ||||
-rw-r--r-- | src/qml/compiler/qv4codegen_p.h | 10 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 1 | ||||
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 2 |
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; |