aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qv4compiler.cpp2
-rw-r--r--src/qml/compiler/qv4compiler_p.h2
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp6
-rw-r--r--src/qml/compiler/qv4isel_masm_p.h6
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp4
-rw-r--r--src/qml/compiler/qv4isel_moth_p.h6
-rw-r--r--src/qml/compiler/qv4isel_p.cpp10
-rw-r--r--src/qml/compiler/qv4isel_p.h10
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
10 files changed, 24 insertions, 26 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
index 11c0873c76..322a39932a 100644
--- a/src/qml/compiler/qv4compiler.cpp
+++ b/src/qml/compiler/qv4compiler.cpp
@@ -44,7 +44,7 @@
#include <qv4isel_p.h>
#include <qv4engine_p.h>
-QV4::Compiler::JSUnitGenerator::JSUnitGenerator(QV4::ExecutionEngine *engine, QQmlJS::V4IR::Module *module)
+QV4::Compiler::JSUnitGenerator::JSUnitGenerator(QQmlJS::V4IR::Module *module)
: irModule(module)
, stringDataSize(0)
, jsClassDataSize(0)
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h
index c6dacfd2fe..6c50073a24 100644
--- a/src/qml/compiler/qv4compiler_p.h
+++ b/src/qml/compiler/qv4compiler_p.h
@@ -58,7 +58,7 @@ struct JSClassMember;
namespace Compiler {
struct JSUnitGenerator {
- JSUnitGenerator(QV4::ExecutionEngine *engine, QQmlJS::V4IR::Module *module);
+ JSUnitGenerator(QQmlJS::V4IR::Module *module);
QQmlJS::V4IR::Module *irModule;
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index 1210e38f9c..fc113c234b 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -673,8 +673,8 @@ JSC::MacroAssemblerCodeRef Assembler::link()
return codeRef;
}
-InstructionSelection::InstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module)
- : EvalInstructionSelection(engine, module)
+InstructionSelection::InstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module)
+ : EvalInstructionSelection(execAllocator, module)
, _block(0)
, _function(0)
, _as(0)
@@ -695,7 +695,7 @@ void InstructionSelection::run(V4IR::Function *function)
qSwap(_function, function);
qSwap(_reentryBlocks, reentryBlocks);
Assembler* oldAssembler = _as;
- _as = new Assembler(this, _function, engine()->executableAllocator);
+ _as = new Assembler(this, _function, executableAllocator);
V4IR::Optimizer opt(_function);
opt.run();
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h
index a74f1c5cc1..fa14d8b4d9 100644
--- a/src/qml/compiler/qv4isel_masm_p.h
+++ b/src/qml/compiler/qv4isel_masm_p.h
@@ -815,7 +815,7 @@ class Q_QML_EXPORT InstructionSelection:
public EvalInstructionSelection
{
public:
- InstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module);
+ InstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module);
~InstructionSelection();
virtual void run(V4IR::Function *function);
@@ -956,8 +956,8 @@ class Q_QML_EXPORT ISelFactory: public EvalISelFactory
{
public:
virtual ~ISelFactory() {}
- virtual EvalInstructionSelection *create(QV4::ExecutionEngine *engine, V4IR::Module *module)
- { return new InstructionSelection(engine, module); }
+ virtual EvalInstructionSelection *create(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module)
+ { return new InstructionSelection(execAllocator, module); }
virtual bool jitCompileRegexps() const
{ return true; }
};
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index c1d926c2e4..a10de5b0a5 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -188,8 +188,8 @@ private:
}
};
-InstructionSelection::InstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module)
- : EvalInstructionSelection(engine, module)
+InstructionSelection::InstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module)
+ : EvalInstructionSelection(execAllocator, module)
, _function(0)
, _block(0)
, _codeStart(0)
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h
index b1755ef003..484d7032de 100644
--- a/src/qml/compiler/qv4isel_moth_p.h
+++ b/src/qml/compiler/qv4isel_moth_p.h
@@ -70,7 +70,7 @@ class Q_QML_EXPORT InstructionSelection:
public EvalInstructionSelection
{
public:
- InstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module);
+ InstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module);
~InstructionSelection();
virtual void run(V4IR::Function *function);
@@ -192,8 +192,8 @@ class Q_QML_EXPORT ISelFactory: public EvalISelFactory
{
public:
virtual ~ISelFactory() {}
- virtual EvalInstructionSelection *create(QV4::ExecutionEngine *engine, V4IR::Module *module)
- { return new InstructionSelection(engine, module); }
+ virtual EvalInstructionSelection *create(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module)
+ { return new InstructionSelection(execAllocator, module); }
virtual bool jitCompileRegexps() const
{ return false; }
};
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp
index 8c49cbd431..5972e3ac33 100644
--- a/src/qml/compiler/qv4isel_p.cpp
+++ b/src/qml/compiler/qv4isel_p.cpp
@@ -58,12 +58,12 @@ QTextStream qout(stderr, QIODevice::WriteOnly);
using namespace QQmlJS;
using namespace QQmlJS::V4IR;
-EvalInstructionSelection::EvalInstructionSelection(QV4::ExecutionEngine *engine, Module *module)
- : _engine(engine)
- , useFastLookups(true)
- , jsUnitGenerator(engine, module)
+EvalInstructionSelection::EvalInstructionSelection(QV4::ExecutableAllocator *execAllocator, Module *module)
+ : useFastLookups(true)
+ , executableAllocator(execAllocator)
+ , jsUnitGenerator(module)
{
- assert(engine);
+ assert(execAllocator);
assert(module);
}
diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h
index 0872311c72..c8e0f6ccd9 100644
--- a/src/qml/compiler/qv4isel_p.h
+++ b/src/qml/compiler/qv4isel_p.h
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
namespace QV4 {
-struct ExecutionEngine;
+struct ExecutableAllocator;
struct Function;
}
@@ -62,7 +62,7 @@ namespace QQmlJS {
class Q_QML_EXPORT EvalInstructionSelection
{
public:
- EvalInstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module);
+ EvalInstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module);
virtual ~EvalInstructionSelection() = 0;
QV4::CompiledData::CompilationUnit *compile();
@@ -77,14 +77,12 @@ public:
int registerJSClass(QQmlJS::V4IR::ExprList *args) { return jsUnitGenerator.registerJSClass(args); }
protected:
- QV4::ExecutionEngine *engine() const { return _engine; }
virtual void run(V4IR::Function *function) = 0;
virtual QV4::CompiledData::CompilationUnit *backendCompileStep() = 0;
-private:
- QV4::ExecutionEngine *_engine;
protected:
bool useFastLookups;
+ QV4::ExecutableAllocator *executableAllocator;
QV4::Compiler::JSUnitGenerator jsUnitGenerator;
};
@@ -92,7 +90,7 @@ class Q_QML_EXPORT EvalISelFactory
{
public:
virtual ~EvalISelFactory() = 0;
- virtual EvalInstructionSelection *create(QV4::ExecutionEngine *engine, V4IR::Module *module) = 0;
+ virtual EvalInstructionSelection *create(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module) = 0;
virtual bool jitCompileRegexps() const = 0;
};
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index fc5300c23d..bb3154e518 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -213,7 +213,7 @@ Value FunctionCtor::construct(Managed *that, Value *args, int argc)
QQmlJS::Codegen cg(v4->current, f->strictMode);
cg(QString(), function, fe, &module);
- QScopedPointer<QQmlJS::EvalInstructionSelection> isel(v4->iselFactory->create(v4, &module));
+ QScopedPointer<QQmlJS::EvalInstructionSelection> isel(v4->iselFactory->create(v4->executableAllocator, &module));
QV4::CompiledData::CompilationUnit *compilationUnit = isel->compile();
QV4::Function *vmf = compilationUnit->linkToEngine(v4);
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index d801978899..2ae7b3d7a8 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -176,7 +176,7 @@ void Script::parse()
Codegen cg(scope, strictMode);
cg(sourceFile, sourceCode, program, &module,
parseAsBinding ? QQmlJS::Codegen::QmlBinding : QQmlJS::Codegen::EvalCode, inheritedLocals);
- QScopedPointer<EvalInstructionSelection> isel(v4->iselFactory->create(v4, &module));
+ QScopedPointer<EvalInstructionSelection> isel(v4->iselFactory->create(v4->executableAllocator, &module));
if (inheritContext)
isel->setUseFastLookups(false);
QV4::CompiledData::CompilationUnit *compilationUnit = isel->compile();