diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-16 21:31:24 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@digia.com> | 2013-08-16 21:39:51 +0200 |
| commit | 3bc7823fc86b4b2f8b7ef5c147c10568e5ed0296 (patch) | |
| tree | 049b1687b85a5f5a3f0300c335ffb792a6a0d3f5 /src/qml/jsruntime/qv4function.cpp | |
| parent | 33149123187fda2bc96bd0288502cca97016791d (diff) | |
Merge Function::init with the constructor
Change-Id: I557f8a80aa2c74398b94e87ed0f29fe8d2297150
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index 87db58580f..e3575086a2 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -51,17 +51,22 @@ QT_BEGIN_NAMESPACE using namespace QV4; -Function::~Function() -{ -} - -void Function::init(CompiledData::CompilationUnit *unit, const CompiledData::Function *function, Value (*codePtr)(ExecutionContext *, const uchar *), - quint32 _codeSize) +Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function, + Value (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize) + : name(0) + , compiledFunction(0) + , compilationUnit(0) + , code(0) + , codeData(0) + , codeSize(0) + , engine(engine) { Q_ASSERT(!compilationUnit); compilationUnit = unit; compiledFunction = function; + name = compilationUnit->runtimeStrings[compiledFunction->nameIndex]; + code = codePtr; codeSize = _codeSize; @@ -77,6 +82,11 @@ void Function::init(CompiledData::CompilationUnit *unit, const CompiledData::Fun locals[i] = engine->newString(unit->data->stringAt(localsIndices[i])->qString()); } +Function::~Function() +{ +} + + void Function::mark() { if (name) |
