From 6fbf62e8e1e1739a3c993de1cec785c0f7625602 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 14 Oct 2013 22:42:06 +0200 Subject: 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 --- src/qml/jsruntime/qv4function.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4function.cpp') 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() -- cgit v1.2.3