diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-04 10:24:46 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-04 10:28:48 +0200 |
commit | 9556f6d075b61fa95d6e1057f305e522a26f71d6 (patch) | |
tree | 53190472453390810c47b9b5a47b23188a00267e /src/qml/compiler | |
parent | 42ffe9b193a5bd958b0853233fd0d94170722bd1 (diff) | |
parent | 1fd0cdc6a2e01775d8a79c6614910cc5a2fbf2b3 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/qml/jsruntime/qv4engine_p.h
src/quick/items/qquickitemsmodule.cpp
src/quick/items/qquicktext.cpp
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 82206ed836..cc9da2817a 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -290,6 +290,7 @@ void Document::removeScriptPragmas(QString &script) Document::Document(bool debugMode) : jsModule(debugMode) , program(0) + , indexOfRootObject(0) , jsGenerator(&jsModule) , unitFlags(0) { @@ -1318,6 +1319,7 @@ QV4::CompiledData::Unit *QmlUnitGenerator::generate(Document &output) const int totalSize = unitSize + importSize + objectOffsetTableSize + objectsSize + output.jsGenerator.stringTable.sizeOfTableAndData(); char *data = (char*)malloc(totalSize); memcpy(data, jsUnit, unitSize); + memset(data + unitSize, 0, totalSize - unitSize); if (jsUnit != compilationUnit->data) free(jsUnit); jsUnit = 0; diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 0d766c2e87..ea82d07e69 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -539,7 +539,7 @@ IR::Expr *Codegen::subscript(IR::Expr *base, IR::Expr *index) IR::Expr *Codegen::argument(IR::Expr *expr) { - if (expr && !expr->asTemp() && !expr->asArgLocal()) { + if (expr && !expr->asTemp()) { const unsigned t = _block->newTemp(); move(_block->TEMP(t), expr); expr = _block->TEMP(t); diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index f46e27fe98..48324fbbc4 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -135,7 +135,7 @@ struct String // uint16 strdata[] static int calculateSize(const QString &str) { - return (sizeof(String) + (str.length() + 1) * sizeof(quint16) + 7) & ~0x7; + return (sizeof(String) + str.length() * sizeof(quint16) + 7) & ~0x7; } }; diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 19ea7ef04d..9e4c7560c1 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -78,7 +78,7 @@ void QV4::Compiler::StringTableGenerator::serialize(CompiledData::Unit *unit) QV4::CompiledData::String *s = (QV4::CompiledData::String*)(stringData); s->flags = 0; // ### s->size = qstr.length(); - memcpy(s + 1, qstr.constData(), (qstr.length() + 1)*sizeof(ushort)); + memcpy(s + 1, qstr.constData(), qstr.length()*sizeof(ushort)); stringData += QV4::CompiledData::String::calculateSize(qstr); } |