aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-15 10:36:41 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-08-15 13:56:07 +0200
commit4b0765da3e2842612ed5464bb750505f0d355b87 (patch)
treedc19ee6b99956619337280ce1db3c1c230cf74be /src/qml/compiler/qv4compileddata.cpp
parent2aee966baa76f55d9061ed22af7bb0abe4f3541e (diff)
Prepare MASM for better runtime string handling
Keep the run-time functions as-is by taking String pointers and use a little bit of inline assembly to resolve the string ids to string pointers, by adding a runtimeStrings array pointer next to the lookups in the context (similar mechanism). Change-Id: Ib5a70bdf47fef7c447d646ccfe03f3dc30d39f20 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 2a39f6237d..a1a355b10f 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -56,16 +56,16 @@ int Function::calculateSize(QQmlJS::V4IR::Function *f)
CompilationUnit::~CompilationUnit()
{
free(data);
- free(runtimeIdentifiers);
+ free(runtimeStrings);
}
QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine)
{
- assert(!runtimeIdentifiers);
+ assert(!runtimeStrings);
assert(data);
- runtimeIdentifiers = (QV4::String**)malloc(data->stringTableSize * sizeof(QV4::String*));
+ runtimeStrings = (QV4::String**)malloc(data->stringTableSize * sizeof(QV4::String*));
for (int i = 0; i < data->stringTableSize; ++i)
- runtimeIdentifiers[i] = engine->newIdentifier(data->stringAt(i)->qString());
+ runtimeStrings[i] = engine->newIdentifier(data->stringAt(i)->qString());
return linkBackendToEngine(engine);
}