diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-19 12:05:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | 713ae5106ff04d15c5854e901681d7f3386b9604 (patch) | |
tree | 938279556853d5a709920805da2c0580296d294b /src/qml/compiler/qv4compileddata.cpp | |
parent | 62cf5b1b6d7dab9517dc1df2b0d1790682ed58cf (diff) |
Change the runtime API over to using StringRef's instead of String*
Change-Id: I0ea95e6cca995dc5f98871f0369204af18e48111
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 991fc922c3..cc1f27c064 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -75,7 +75,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) assert(!runtimeStrings); assert(data); - runtimeStrings = (QV4::String**)malloc(data->stringTableSize * sizeof(QV4::String*)); + runtimeStrings = (QV4::SafeString *)malloc(data->stringTableSize * sizeof(QV4::SafeString)); for (int i = 0; i < data->stringTableSize; ++i) runtimeStrings[i] = engine->newIdentifier(data->stringAt(i)); @@ -110,7 +110,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) l->classList[i] = 0; l->level = -1; l->index = UINT_MAX; - l->name = runtimeStrings[compiledLookups[i].nameIndex]; + l->name = runtimeStrings[compiledLookups[i].nameIndex].asString(); } } @@ -122,7 +122,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) const CompiledData::JSClassMember *member = data->jsClassAt(i, &memberCount); QV4::InternalClass *klass = engine->objectClass; for (int j = 0; j < memberCount; ++j, ++member) - klass = klass->addMember(runtimeStrings[member->nameOffset], member->isAccessor ? QV4::Attr_Accessor : QV4::Attr_Data); + klass = klass->addMember(runtimeStrings[member->nameOffset].asString(), member->isAccessor ? QV4::Attr_Accessor : QV4::Attr_Data); runtimeClasses[i] = klass; } @@ -162,7 +162,7 @@ void CompilationUnit::unlink() void CompilationUnit::markObjects() { for (int i = 0; i < data->stringTableSize; ++i) - runtimeStrings[i]->mark(); + runtimeStrings[i].mark(); for (int i = 0; i < data->regexpTableSize; ++i) runtimeRegularExpressions[i].mark(); for (int i = 0; i < runtimeFunctions.count(); ++i) |