diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-14 22:42:06 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-15 06:43:53 +0200 |
commit | 6fbf62e8e1e1739a3c993de1cec785c0f7625602 (patch) | |
tree | df5381afccf8ffad3f406020cd0d117804d8c581 /src/qml/jsruntime/qv4function.cpp | |
parent | df267e50195c00f2085ed93ceb5f59ed81f89206 (diff) |
Fix some more issues with exact GC
Get the formal and local names of function object from the
compilation unit to avoid creating another set of strings.
Use a ScopedFunctionObject in eval()
Change-Id: I6693aec2e88818df9c160b3780db12d8df79c2fe
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index 65fec54be6..291d7cc033 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -65,14 +65,14 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, formals.fill(0); const quint32 *formalsIndices = compiledFunction->formalsTable(); for (int i = 0; i < compiledFunction->nFormals; ++i) - formals[i] = engine->newString(unit->data->stringAt(formalsIndices[i]))->getPointer(); + formals[i] = compilationUnit->runtimeStrings[formalsIndices[i]].asString(); locals.resize(compiledFunction->nLocals); locals.fill(0); const quint32 *localsIndices = compiledFunction->localsTable(); for (int i = 0; i < compiledFunction->nLocals; ++i) - locals[i] = engine->newString(unit->data->stringAt(localsIndices[i]))->getPointer(); + locals[i] = compilationUnit->runtimeStrings[localsIndices[i]].asString(); } Function::~Function() |