Merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_reenable_qmlcache into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src

Proposed by Timo Jyrinki
Status: Merged
Merged at revision: 181
Proposed branch: lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_reenable_qmlcache
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src
Diff against target: 896 lines (+294/-159)
5 files modified
debian/changelog (+10/-0)
debian/libqt5qml5.symbols (+6/-1)
debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch (+269/-156)
debian/patches/series (+1/-1)
debian/rules (+8/-1)
To merge this branch: bzr merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource-src_reenable_qmlcache
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Kubuntu Packagers Pending
Review via email: mp+250876@code.launchpad.net

Commit message

* debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch:
  - [regression] Re-enable the opt-in QML cache patch (LP: #1418060)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
182. By Timo Jyrinki

Add headers to the QML cache patch.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
183. By Timo Jyrinki

* Update symbols from build logs.
* Don't run unit tests on 32-bit powerpc, those fail more often
  than not. Other archs not affected.

Also, small tweaks to the QML cache patch.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(CI is still broken, but all testing has now succeeded)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-02-16 12:07:42 +0000
3+++ debian/changelog 2015-02-26 09:47:31 +0000
4@@ -1,3 +1,13 @@
5+qtdeclarative-opensource-src (5.4.0-4ubuntu2) vivid; urgency=medium
6+
7+ * debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch:
8+ - [regression] Re-enable the opt-in QML cache patch (LP: #1418060)
9+ * Update symbols from build logs.
10+ * Don't run unit tests on 32-bit powerpc, those fail more often
11+ than not. Other archs not affected.
12+
13+ -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Tue, 24 Feb 2015 14:01:39 +0000
14+
15 qtdeclarative-opensource-src (5.4.0-4ubuntu1) vivid; urgency=medium
16
17 * New upstream release.
18
19=== modified file 'debian/libqt5qml5.symbols'
20--- debian/libqt5qml5.symbols 2015-02-10 15:24:07 +0000
21+++ debian/libqt5qml5.symbols 2015-02-26 09:47:31 +0000
22@@ -1573,6 +1573,7 @@
23 _ZN3QV422PersistentValuePrivateD0Ev@Base 5.2.0~beta1
24 _ZN3QV422PersistentValuePrivateD1Ev@Base 5.2.0~beta1
25 _ZN3QV422PersistentValuePrivateD2Ev@Base 5.2.0~beta1
26+ _ZN3QV424EvalInstructionSelection6runAllEb@Base 5.4.0 1
27 _ZN3QV424EvalInstructionSelection7compileEb@Base 5.3.0 1
28 _ZN3QV424EvalInstructionSelectionC1EPNS_19ExecutableAllocatorEPNS_2IR6ModuleEPNS_8Compiler15JSUnitGeneratorE@Base 5.3.0 1
29 _ZN3QV424EvalInstructionSelectionC2EPNS_19ExecutableAllocatorEPNS_2IR6ModuleEPNS_8Compiler15JSUnitGeneratorE@Base 5.3.0 1
30@@ -1642,6 +1643,7 @@
31 (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection22callBuiltinDeleteValueEPNS_2IR4ExprE@Base 5.4.0
32 (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection22callBuiltinTypeofValueEPNS_2IR4ExprES4_@Base 5.4.0
33 (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection22loadQmlImportedScriptsEPNS_2IR4ExprE@Base 5.4.0
34+ (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection22mutableCompilationUnitEv@Base 5.4.0
35 (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection23callBuiltinDeleteMemberEPNS_2IR4ExprERK7QStringS4_@Base 5.4.0
36 (arch=amd64 armhf i386)_ZN3QV43JIT20InstructionSelection23callBuiltinTypeofMemberEPNS_2IR4ExprERK7QStringS4_@Base 5.4.0
37 (arch=!arm64 !powerpc !ppc64el)_ZN3QV43JIT20InstructionSelection23visitCJumpNullUndefinedENS_2IR4TypeEPNS2_5BinopEPNS2_10BasicBlockES7_@Base 5.3.0
38@@ -1711,6 +1713,7 @@
39 _ZN3QV44Moth20InstructionSelection22callBuiltinDeleteValueEPNS_2IR4ExprE@Base 5.4.0
40 _ZN3QV44Moth20InstructionSelection22callBuiltinTypeofValueEPNS_2IR4ExprES4_@Base 5.4.0
41 _ZN3QV44Moth20InstructionSelection22loadQmlImportedScriptsEPNS_2IR4ExprE@Base 5.4.0
42+ _ZN3QV44Moth20InstructionSelection22mutableCompilationUnitEv@Base 5.4.0
43 _ZN3QV44Moth20InstructionSelection23callBuiltinDeleteMemberEPNS_2IR4ExprERK7QStringS4_@Base 5.4.0
44 _ZN3QV44Moth20InstructionSelection23callBuiltinTypeofMemberEPNS_2IR4ExprERK7QStringS4_@Base 5.4.0
45 _ZN3QV44Moth20InstructionSelection24callBuiltinPushWithScopeEPNS_2IR4ExprE@Base 5.4.0
46@@ -3358,7 +3361,7 @@
47 (optional=templinst|arch=amd64 ppc64el)_ZNSt6vectorIbSaIbEE6resizeEmb@Base 5.4.0
48 (optional=templinst|subst)_ZNSt6vectorIbSaIbEEC1E{size_t}RKbRKS0_@Base 5.4.0
49 (optional=templinst|subst)_ZNSt6vectorIbSaIbEEC2E{size_t}RKbRKS0_@Base 5.4.0
50- (optional=templinst|arch=armhf)_ZNSt6vectorIcSaIcEE17_M_default_appendEj@Base 5.4.0
51+ (optional=templinst|arch=amd64 armhf i386|subst)_ZNSt6vectorIcSaIcEE17_M_default_appendE{size_t}@Base 5.4.0
52 (optional=templinst|arch=amd64 i386)_ZNSt6vectorIcSaIcEE9push_backERKc@Base 5.4.0
53 (optional=templinst)_ZNSt6vectorIiSaIiEE12emplace_backIIiEEEvDpOT_@Base 5.4.0
54 (optional=templinst)_ZNSt6vectorIiSaIiEE12emplace_backIJiEEEvDpOT_@Base 5.4.0
55@@ -4017,9 +4020,11 @@
56 (c++)"non-virtual thunk to QQmlTimer::componentComplete()@Base" 5.0.2
57 (c++)"non-virtual thunk to QQmlTimer::~QQmlTimer()@Base" 5.0.2
58 (c++|arch=!arm64 !powerpc !ppc64el)"non-virtual thunk to QV4::JIT::InstructionSelection::backendCompileStep()@Base" 5.3.0
59+ (c++|arch=amd64 armhf i386)"non-virtual thunk to QV4::JIT::InstructionSelection::mutableCompilationUnit()@Base" 5.4.0
60 (c++|arch=!arm64 !powerpc !ppc64el)"non-virtual thunk to QV4::JIT::InstructionSelection::run(int)@Base" 5.3.0
61 (c++|arch=!arm64 !powerpc !ppc64el)"non-virtual thunk to QV4::JIT::InstructionSelection::~InstructionSelection()@Base" 5.3.0
62 (c++)"non-virtual thunk to QV4::Moth::InstructionSelection::backendCompileStep()@Base" 5.3.0
63+ (c++)"non-virtual thunk to QV4::Moth::InstructionSelection::mutableCompilationUnit()@Base" 5.4.0
64 (c++)"non-virtual thunk to QV4::Moth::InstructionSelection::run(int)@Base" 5.3.0
65 (c++)"non-virtual thunk to QV4::Moth::InstructionSelection::~InstructionSelection()@Base" 5.3.0
66 qt_v4StackTrace@Base 5.3.0
67
68=== modified file 'debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch'
69--- debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch 2015-02-10 12:14:13 +0000
70+++ debian/patches/QML-Compilation-unit-caching-and-JIT-changes.patch 2015-02-26 09:47:31 +0000
71@@ -1,7 +1,19 @@
72-Index: qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/ARMv7Assembler.h
73+Description: Add optional JIT unit cache
74+ This patch adds a JIT unit cache to QML that speeds up application launches
75+ after the first launch has been done. It is activated only when environment
76+ variable QV4_ENABLE_JIT_CACHE is set.
77+ .
78+ It has not yet been sent upstream for discussion, but that's being planned.
79+Author: Ricardo Mendoza <ricardo.mendoza@canonical.com>
80+Origin: Canonical
81+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1418060
82+Forwarded: No
83+Last-Update: 2015-02-25
84+
85+Index: qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/ARMv7Assembler.h
86 ===================================================================
87---- qtdeclarative-opensource-src-5.3.2.orig/src/3rdparty/masm/assembler/ARMv7Assembler.h
88-+++ qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/ARMv7Assembler.h
89+--- qtdeclarative-opensource-src-5.4.0.orig/src/3rdparty/masm/assembler/ARMv7Assembler.h
90++++ qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/ARMv7Assembler.h
91 @@ -445,6 +445,12 @@ public:
92 ConditionInvalid
93 } Condition;
94@@ -23,10 +35,10 @@
95
96 unsigned debugOffset() { return m_buffer.debugOffset(); }
97
98-Index: qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
99+Index: qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
100 ===================================================================
101---- qtdeclarative-opensource-src-5.3.2.orig/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
102-+++ qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
103+--- qtdeclarative-opensource-src-5.4.0.orig/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
104++++ qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/AbstractMacroAssembler.h
105 @@ -486,6 +486,11 @@ public:
106 return Call(jump.m_label, Linkable);
107 }
108@@ -52,10 +64,10 @@
109 protected:
110 AbstractMacroAssembler()
111 : m_randomSource(cryptographicallyRandomNumber())
112-Index: qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/AssemblerBuffer.h
113+Index: qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/AssemblerBuffer.h
114 ===================================================================
115---- qtdeclarative-opensource-src-5.3.2.orig/src/3rdparty/masm/assembler/AssemblerBuffer.h
116-+++ qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/AssemblerBuffer.h
117+--- qtdeclarative-opensource-src-5.4.0.orig/src/3rdparty/masm/assembler/AssemblerBuffer.h
118++++ qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/AssemblerBuffer.h
119 @@ -86,6 +86,14 @@ namespace JSC {
120 grow();
121 }
122@@ -71,10 +83,10 @@
123 bool isAligned(int alignment) const
124 {
125 return !(m_index & (alignment - 1));
126-Index: qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/LinkBuffer.h
127+Index: qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/LinkBuffer.h
128 ===================================================================
129---- qtdeclarative-opensource-src-5.3.2.orig/src/3rdparty/masm/assembler/LinkBuffer.h
130-+++ qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/LinkBuffer.h
131+--- qtdeclarative-opensource-src-5.4.0.orig/src/3rdparty/masm/assembler/LinkBuffer.h
132++++ qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/LinkBuffer.h
133 @@ -109,11 +109,13 @@ public:
134
135 // These methods are used to link or set values at code generation time.
136@@ -90,10 +102,10 @@
137 }
138
139 void link(Jump jump, CodeLocationLabel label)
140-Index: qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/X86Assembler.h
141+Index: qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/X86Assembler.h
142 ===================================================================
143---- qtdeclarative-opensource-src-5.3.2.orig/src/3rdparty/masm/assembler/X86Assembler.h
144-+++ qtdeclarative-opensource-src-5.3.2/src/3rdparty/masm/assembler/X86Assembler.h
145+--- qtdeclarative-opensource-src-5.4.0.orig/src/3rdparty/masm/assembler/X86Assembler.h
146++++ qtdeclarative-opensource-src-5.4.0/src/3rdparty/masm/assembler/X86Assembler.h
147 @@ -101,6 +101,11 @@ public:
148 ConditionNC = ConditionAE,
149 } Condition;
150@@ -114,10 +126,10 @@
151
152 PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort)
153 {
154-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/compiler.pri
155+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/compiler.pri
156 ===================================================================
157---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/compiler.pri
158-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/compiler.pri
159+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/compiler.pri
160++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/compiler.pri
161 @@ -28,10 +28,10 @@ HEADERS += \
162 $$PWD/qv4isel_moth_p.h \
163 $$PWD/qv4instr_moth_p.h
164@@ -130,14 +142,14 @@
165
166 +DEFINES += V4_UNIT_CACHE
167 }
168-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmlirbuilder.cpp
169+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmlirbuilder.cpp
170 ===================================================================
171---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qqmlirbuilder.cpp
172-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmlirbuilder.cpp
173-@@ -1512,7 +1512,12 @@ bool IRBuilder::isStatementNodeScript(QQ
174- QV4::CompiledData::QmlUnit *QmlUnitGenerator::generate(Document &output)
175+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qqmlirbuilder.cpp
176++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmlirbuilder.cpp
177+@@ -1502,7 +1502,12 @@ bool IRBuilder::isStatementNodeScript(QQ
178+ QV4::CompiledData::Unit *QmlUnitGenerator::generate(Document &output)
179 {
180- QV4::CompiledData::CompilationUnit *compilationUnit = output.javaScriptCompilationUnit;
181+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit = output.javaScriptCompilationUnit;
182 - QV4::CompiledData::Unit *jsUnit = compilationUnit->createUnitData(&output);
183 + QV4::CompiledData::Unit *jsUnit;
184 + if (!compilationUnit->data)
185@@ -148,19 +160,63 @@
186 const uint unitSize = jsUnit->unitSize;
187
188 const int importSize = sizeof(QV4::CompiledData::Import) * output.imports.count();
189-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmltypecompiler.cpp
190+@@ -1527,7 +1532,6 @@ QV4::CompiledData::Unit *QmlUnitGenerato
191+ memcpy(data, jsUnit, unitSize);
192+ if (jsUnit != compilationUnit->data)
193+ free(jsUnit);
194+- jsUnit = 0;
195+
196+ QV4::CompiledData::Unit *qmlUnit = reinterpret_cast<QV4::CompiledData::Unit *>(data);
197+ qmlUnit->unitSize = totalSize;
198+@@ -1538,8 +1542,22 @@ QV4::CompiledData::Unit *QmlUnitGenerato
199+ qmlUnit->offsetToObjects = unitSize + importSize;
200+ qmlUnit->nObjects = output.objects.count();
201+ qmlUnit->indexOfRootObject = output.indexOfRootObject;
202++
203++#ifdef ENABLE_UNIT_CACHE
204++ if (compilationUnit->isRestored) {
205++ qmlUnit->offsetToStringTable = jsUnit->offsetToStringTable;
206++ qmlUnit->stringTableSize = jsUnit->stringTableSize;
207++ } else {
208++ qmlUnit->offsetToStringTable = totalSize - output.jsGenerator.stringTable.sizeOfTableAndData();
209++ qmlUnit->stringTableSize = output.jsGenerator.stringTable.stringCount();
210++ }
211++#else
212+ qmlUnit->offsetToStringTable = totalSize - output.jsGenerator.stringTable.sizeOfTableAndData();
213+ qmlUnit->stringTableSize = output.jsGenerator.stringTable.stringCount();
214++#endif
215++
216++ // Release
217++ jsUnit = 0;
218+
219+ // write imports
220+ char *importPtr = data + qmlUnit->offsetToImports;
221+@@ -1631,7 +1649,12 @@ QV4::CompiledData::Unit *QmlUnitGenerato
222+ }
223+ }
224+
225++#ifdef ENABLE_UNIT_CACHE
226++ if (!compilationUnit->isRestored)
227++ output.jsGenerator.stringTable.serialize(qmlUnit);
228++#else
229+ output.jsGenerator.stringTable.serialize(qmlUnit);
230++#endif
231+
232+ return qmlUnit;
233+ }
234+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmltypecompiler.cpp
235 ===================================================================
236---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qqmltypecompiler.cpp
237-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmltypecompiler.cpp
238-@@ -226,6 +226,7 @@ bool QQmlTypeCompiler::compile()
239- QV4::ExecutionEngine *v4 = engine->v4engine();
240+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qqmltypecompiler.cpp
241++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmltypecompiler.cpp
242+@@ -219,6 +219,7 @@ bool QQmlTypeCompiler::compile()
243 QScopedPointer<QV4::EvalInstructionSelection> isel(v4->iselFactory->create(engine, v4->executableAllocator, &document->jsModule, &document->jsGenerator));
244 isel->setUseFastLookups(false);
245+ isel->setUseTypeInference(true);
246 + isel->setEngine(engine);
247 document->javaScriptCompilationUnit = isel->compile(/*generated unit data*/false);
248 }
249
250-@@ -435,6 +436,7 @@ QQmlPropertyCacheCreator::QQmlPropertyCa
251+@@ -419,6 +420,7 @@ QQmlPropertyCacheCreator::QQmlPropertyCa
252 , qmlObjects(*typeCompiler->qmlObjects())
253 , imports(typeCompiler->imports())
254 , resolvedTypes(typeCompiler->resolvedTypes())
255@@ -168,11 +224,11 @@
256 {
257 }
258
259-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmltypecompiler_p.h
260+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmltypecompiler_p.h
261 ===================================================================
262---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qqmltypecompiler_p.h
263-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qqmltypecompiler_p.h
264-@@ -149,6 +149,7 @@ protected:
265+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qqmltypecompiler_p.h
266++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qqmltypecompiler_p.h
267+@@ -140,6 +140,7 @@ protected:
268 QHash<int, QQmlCompiledData::TypeReference*> *resolvedTypes;
269 QVector<QByteArray> vmeMetaObjects;
270 QVector<QQmlPropertyCache*> propertyCaches;
271@@ -180,61 +236,64 @@
272 };
273
274 // "Converts" signal expressions to full-fleged function declarations with
275-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4compileddata_p.h
276+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4compileddata_p.h
277 ===================================================================
278---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qv4compileddata_p.h
279-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4compileddata_p.h
280-@@ -607,6 +607,9 @@ struct Q_QML_PRIVATE_EXPORT CompilationU
281+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qv4compileddata_p.h
282++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4compileddata_p.h
283+@@ -594,6 +594,11 @@ struct Q_QML_PRIVATE_EXPORT CompilationU
284 QV4::InternalClass **runtimeClasses;
285 QVector<QV4::Function *> runtimeFunctions;
286
287++#ifdef ENABLE_UNIT_CACHE
288 + QVector<int> lookupTable;
289 + bool isRestored;
290++#endif
291 +
292 QV4::Function *linkToEngine(QV4::ExecutionEngine *engine);
293 void unlink();
294
295-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_moth_p.h
296+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_moth_p.h
297 ===================================================================
298---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qv4isel_moth_p.h
299-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_moth_p.h
300-@@ -72,6 +72,7 @@ public:
301+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qv4isel_moth_p.h
302++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_moth_p.h
303+@@ -64,9 +64,11 @@ public:
304 ~InstructionSelection();
305
306 virtual void run(int functionIndex);
307-+ virtual QV4::JIT::InstructionSelection* impl() { return NULL; };;
308++ virtual QV4::JIT::InstructionSelection* impl() { return NULL; };
309
310 protected:
311- virtual QV4::CompiledData::CompilationUnit *backendCompileStep();
312-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_p.cpp
313+ virtual QQmlRefPointer<CompiledData::CompilationUnit> backendCompileStep();
314++ virtual QV4::CompiledData::CompilationUnit* mutableCompilationUnit();
315+
316+ virtual void visitJump(IR::Jump *);
317+ virtual void visitCJump(IR::CJump *);
318+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_p.cpp
319 ===================================================================
320---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qv4isel_p.cpp
321-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_p.cpp
322-@@ -1,8 +1,14 @@
323--/****************************************************************************
324-+/***************************************************************************
325- **
326- ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
327+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qv4isel_p.cpp
328++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_p.cpp
329+@@ -3,6 +3,12 @@
330+ ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
331 ** Contact: http://www.qt-project.org/legal
332 **
333-+** Copyright (C) 2014 Nomovok Ltd. All rights reserved.
334++** Copyright (C) 2015 Nomovok Ltd. All rights reserved.
335 +** Contact: info@nomovok.com
336 +**
337-+** Copyright (C) 2014 Canonical Limited and/or its subsidiary(-ies).
338++** Copyright (C) 2015 Canonical Limited and/or its subsidiary(-ies).
339 +** Contact: ricardo.mendoza@canonical.com
340 +**
341 ** This file is part of the QtQml module of the Qt Toolkit.
342 **
343- ** $QT_BEGIN_LICENSE:LGPL$
344-@@ -49,6 +55,54 @@
345+ ** $QT_BEGIN_LICENSE:LGPL21$
346+@@ -41,6 +47,54 @@
347
348 #include <QString>
349
350-+#ifndef V4_ENABLE_JIT
351-+#undef V4_UNIT_CACHE
352++#ifndef V4_UNIT_CACHE
353++#undef ENABLE_UNIT_CACHE
354 +#endif
355 +
356-+#ifdef V4_UNIT_CACHE
357++#ifdef ENABLE_UNIT_CACHE
358 +#include <private/qqmltypenamecache_p.h>
359 +#include <private/qqmlcompiler_p.h>
360 +#include <private/qqmltypeloader_p.h>
361@@ -281,7 +340,7 @@
362 namespace {
363 Q_GLOBAL_STATIC_WITH_ARGS(QTextStream, qout, (stderr, QIODevice::WriteOnly));
364 #define qout *qout()
365-@@ -57,6 +111,14 @@ Q_GLOBAL_STATIC_WITH_ARGS(QTextStream, q
366+@@ -49,6 +103,14 @@ Q_GLOBAL_STATIC_WITH_ARGS(QTextStream, q
367 using namespace QV4;
368 using namespace QV4::IR;
369
370@@ -295,8 +354,8 @@
371 +
372 EvalInstructionSelection::EvalInstructionSelection(QV4::ExecutableAllocator *execAllocator, Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator)
373 : useFastLookups(true)
374- , executableAllocator(execAllocator)
375-@@ -71,6 +133,9 @@ EvalInstructionSelection::EvalInstructio
376+ , useTypeInference(true)
377+@@ -64,6 +126,9 @@ EvalInstructionSelection::EvalInstructio
378 Q_ASSERT(execAllocator);
379 #endif
380 Q_ASSERT(module);
381@@ -306,45 +365,45 @@
382 }
383
384 EvalInstructionSelection::~EvalInstructionSelection()
385-@@ -79,17 +144,306 @@ EvalInstructionSelection::~EvalInstructi
386+@@ -72,15 +137,307 @@ EvalInstructionSelection::~EvalInstructi
387 EvalISelFactory::~EvalISelFactory()
388 {}
389
390--QV4::CompiledData::CompilationUnit *EvalInstructionSelection::compile(bool generateUnitData)
391-+QV4::CompiledData::CompilationUnit *EvalInstructionSelection::runAll(bool generateUnitData)
392+-QQmlRefPointer<CompiledData::CompilationUnit> EvalInstructionSelection::compile(bool generateUnitData)
393++QQmlRefPointer<QV4::CompiledData::CompilationUnit> EvalInstructionSelection::runAll(bool generateUnitData)
394 {
395 - for (int i = 0; i < irModule->functions.size(); ++i)
396 - run(i);
397-+ QV4::CompiledData::CompilationUnit *unit;
398-+
399 + for (int i = 0; i < irModule->functions.size(); ++i) {
400 + run(i); // Performs the actual compilation
401 + }
402 +
403-+ unit = backendCompileStep();
404++ QQmlRefPointer<QV4::CompiledData::CompilationUnit> result = backendCompileStep();
405 +
406-+#ifdef V4_UNIT_CACHE
407-+ unit->isRestored = false;
408++#ifdef ENABLE_UNIT_CACHE
409++ result->isRestored = false;
410 +#endif
411
412-- QV4::CompiledData::CompilationUnit *unit = backendCompileStep();
413+- QQmlRefPointer<QV4::CompiledData::CompilationUnit> unit = backendCompileStep();
414 if (generateUnitData)
415- unit->data = jsGenerator->generateUnit();
416-+
417- return unit;
418- }
419-
420-+QV4::CompiledData::CompilationUnit *EvalInstructionSelection::compile(bool generateUnitData)
421++ result->data = jsGenerator->generateUnit();
422++
423++ return result;
424++}
425++
426++QQmlRefPointer<QV4::CompiledData::CompilationUnit> EvalInstructionSelection::compile(bool generateUnitData)
427 +{
428-+#ifndef V4_UNIT_CACHE
429++#ifndef ENABLE_UNIT_CACHE
430 + return runAll(generateUnitData);
431 +#else
432++ QQmlRefPointer<QV4::CompiledData::CompilationUnit> result(nullptr);
433++
434 + // Check if running JIT mode and if cache is enabled
435-+ if (!do_cache || !this->impl())
436++ if (!do_cache || !this->impl()) {
437 + return runAll(generateUnitData);
438++ }
439 +
440 + QV4::CompiledData::CompilationUnit *unit;
441-+
442 + bool loaded = false;
443 + bool do_save = true;
444 +
445@@ -433,10 +492,9 @@
446 + // This code has been inspired and influenced by Nomovok's QMLC compiler available at
447 + // https://github.com/qmlc/qmlc. All original Copyrights are maintained for the
448 + // basic code snippets.
449-+
450 + if (loaded) {
451 + // Retrieve unit skeleton from isel implementation
452-+ unit = backendCompileStep();
453++ unit = mutableCompilationUnit();
454 + QV4::JIT::CompilationUnit *tmpUnit = (QV4::JIT::CompilationUnit *) unit;
455 + tmpUnit->codeRefs.resize(irModule->functions.size());
456 +
457@@ -496,7 +554,7 @@
458 +
459 + QV4::IR::Function nullFunction(0, 0, QLatin1String(""));
460 +
461-+ QV4::JIT::Assembler* as = new QV4::JIT::Assembler(this->impl(), &nullFunction, executableAllocator, 6);
462++ QV4::JIT::Assembler* as = new QV4::JIT::Assembler(this->impl(), &nullFunction, executableAllocator);
463 +
464 + QList<QV4::JIT::Assembler::CallToLink>& callsToLink = as->callsToLink();
465 + for (int i = 0; i < linkCalls.size(); i++) {
466@@ -531,18 +589,22 @@
467 + if (size > 0)
468 + readData((char *)dataPtr, size, stream);
469 +
470++ result = backendCompileStep();
471++ unit = result.data();
472++
473 + unit->data = nullptr;
474 + if (irModule->functions.size() > 0)
475 + unit->data = finalUnit;
476-+
477 + unit->isRestored = true;
478 + } else {
479 + // Not loading from cache, run all instructions
480-+ unit = runAll(false);
481++ result = runAll(false);
482++ unit = result.data();
483 + }
484 +
485 + if ((unit->data == nullptr) && (do_save || generateUnitData))
486-+ unit->data = jsGenerator->generateUnit();
487+ unit->data = jsGenerator->generateUnit();
488+- return unit;
489 +
490 + // Save compilation unit
491 + QV4::JIT::CompilationUnit *jitUnit = (QV4::JIT::CompilationUnit *) unit;
492@@ -610,18 +672,17 @@
493 + cacheFile.close();
494 + }
495 + }
496-+ return unit;
497++
498++ return result;
499 +#endif
500-+}
501-+
502+ }
503+
504 void IRDecoder::visitMove(IR::Move *s)
505- {
506- if (IR::Name *n = s->target->asName()) {
507-Index: qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_p.h
508+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_p.h
509 ===================================================================
510---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/compiler/qv4isel_p.h
511-+++ qtdeclarative-opensource-src-5.3.2/src/qml/compiler/qv4isel_p.h
512-@@ -56,6 +56,10 @@ class QQmlEnginePrivate;
513+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qv4isel_p.h
514++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_p.h
515+@@ -48,6 +48,10 @@ class QQmlEnginePrivate;
516
517 namespace QV4 {
518
519@@ -632,15 +693,15 @@
520 class ExecutableAllocator;
521 struct Function;
522
523-@@ -65,6 +69,7 @@ public:
524+@@ -57,6 +61,7 @@ public:
525 EvalInstructionSelection(QV4::ExecutableAllocator *execAllocator, IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator);
526 virtual ~EvalInstructionSelection() = 0;
527
528-+ QV4::CompiledData::CompilationUnit *runAll(bool generateUnitData);
529- QV4::CompiledData::CompilationUnit *compile(bool generateUnitData = true);
530++ QQmlRefPointer<QV4::CompiledData::CompilationUnit> runAll(bool generateUnitData);
531+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> compile(bool generateUnitData = true);
532
533 void setUseFastLookups(bool b) { useFastLookups = b; }
534-@@ -78,9 +83,11 @@ public:
535+@@ -71,10 +76,13 @@ public:
536 int registerRegExp(IR::RegExp *regexp) { return jsGenerator->registerRegExp(regexp); }
537 int registerJSClass(int count, IR::ExprList *args) { return jsGenerator->registerJSClass(count, args); }
538 QV4::Compiler::JSUnitGenerator *jsUnitGenerator() const { return jsGenerator; }
539@@ -649,10 +710,12 @@
540 protected:
541 virtual void run(int functionIndex) = 0;
542 + virtual QV4::JIT::InstructionSelection* impl() = 0;
543- virtual QV4::CompiledData::CompilationUnit *backendCompileStep() = 0;
544+ virtual QQmlRefPointer<QV4::CompiledData::CompilationUnit> backendCompileStep() = 0;
545++ virtual QV4::CompiledData::CompilationUnit* mutableCompilationUnit() = 0;
546
547 bool useFastLookups;
548-@@ -88,6 +95,7 @@ protected:
549+ bool useTypeInference;
550+@@ -82,6 +90,7 @@ protected:
551 QV4::Compiler::JSUnitGenerator *jsGenerator;
552 QScopedPointer<QV4::Compiler::JSUnitGenerator> ownJSGenerator;
553 IR::Module *irModule;
554@@ -660,27 +723,32 @@
555 };
556
557 class Q_QML_PRIVATE_EXPORT EvalISelFactory
558-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4assembler.cpp
559+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4assembler.cpp
560 ===================================================================
561---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jit/qv4assembler.cpp
562-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4assembler.cpp
563-@@ -77,7 +77,10 @@ void CompilationUnit::linkBackendToEngin
564+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jit/qv4assembler.cpp
565++++ qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4assembler.cpp
566+@@ -69,7 +69,15 @@ void CompilationUnit::linkBackendToEngin
567
568 QV4::Function *runtimeFunction = new QV4::Function(engine, this, compiledFunction,
569 (ReturnedValue (*)(QV4::ExecutionContext *, const uchar *)) codeRefs[i].code().executableAddress());
570 - runtimeFunctions[i] = runtimeFunction;
571++
572++#if ENABLE_UNIT_CACHE
573 + if (isRestored)
574 + runtimeFunctions[lookupTable.at(i)] = runtimeFunction;
575 + else
576 + runtimeFunctions[i] = runtimeFunction;
577++#else
578++ runtimeFunctions[i] = runtimeFunction;
579++#endif
580 }
581 }
582
583-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4assembler_p.h
584+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4assembler_p.h
585 ===================================================================
586---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jit/qv4assembler_p.h
587-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4assembler_p.h
588-@@ -70,6 +70,16 @@ namespace JIT {
589+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jit/qv4assembler_p.h
590++++ qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4assembler_p.h
591+@@ -63,6 +63,16 @@ namespace JIT {
592
593 class InstructionSelection;
594
595@@ -697,7 +765,7 @@
596 struct CompilationUnit : public QV4::CompiledData::CompilationUnit
597 {
598 virtual ~CompilationUnit();
599-@@ -82,6 +92,8 @@ struct CompilationUnit : public QV4::Com
600+@@ -75,6 +85,8 @@ struct CompilationUnit : public QV4::Com
601
602 QVector<JSC::MacroAssemblerCodeRef> codeRefs;
603 QList<QVector<QV4::Primitive> > constantValues;
604@@ -706,7 +774,7 @@
605 };
606
607 struct RelativeCall {
608-@@ -1151,7 +1163,12 @@ public:
609+@@ -1064,7 +1076,12 @@ public:
610 move(TrustedImm64(u.i), ReturnValueRegister);
611 move64ToDouble(ReturnValueRegister, target);
612 #else
613@@ -720,7 +788,7 @@
614 #endif
615 return target;
616 }
617-@@ -1241,6 +1258,12 @@ public:
618+@@ -1152,6 +1169,12 @@ public:
619 Label exceptionReturnLabel;
620 IR::BasicBlock * catchBlock;
621 QVector<Jump> exceptionPropagationJumps;
622@@ -731,12 +799,12 @@
623 + QList<CallToLink>& callsToLink() { return _callsToLink; }
624 +
625 private:
626- const StackLayout _stackLayout;
627+ QScopedPointer<const StackLayout> _stackLayout;
628 ConstantTable _constTable;
629-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4cachedlinkdata_p.h
630+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4cachedlinkdata_p.h
631 ===================================================================
632 --- /dev/null
633-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4cachedlinkdata_p.h
634++++ qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4cachedlinkdata_p.h
635 @@ -0,0 +1,188 @@
636 +/***************************************************************************
637 +**
638@@ -926,11 +994,11 @@
639 +QT_END_NAMESPACE
640 +
641 +#endif
642-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4isel_masm.cpp
643+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4isel_masm.cpp
644 ===================================================================
645---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jit/qv4isel_masm.cpp
646-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4isel_masm.cpp
647-@@ -51,6 +51,7 @@
648+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jit/qv4isel_masm.cpp
649++++ qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4isel_masm.cpp
650+@@ -43,6 +43,7 @@
651 #include "qv4assembler_p.h"
652 #include "qv4unop_p.h"
653 #include "qv4binop_p.h"
654@@ -938,7 +1006,7 @@
655
656 #include <QtCore/QBuffer>
657
658-@@ -147,9 +148,13 @@ JSC::MacroAssemblerCodeRef Assembler::li
659+@@ -139,9 +140,13 @@ JSC::MacroAssemblerCodeRef Assembler::li
660 JSC::LinkBuffer linkBuffer(dummy, this, 0);
661
662 QHash<void*, const char*> functions;
663@@ -953,7 +1021,7 @@
664 }
665
666 foreach (const DataLabelPatch &p, _dataLabelPatches)
667-@@ -367,6 +372,25 @@ void InstructionSelection::run(int funct
668+@@ -277,6 +282,25 @@ void InstructionSelection::run(int funct
669 JSC::MacroAssemblerCodeRef codeRef =_as->link(&dummySize);
670 compilationUnit->codeRefs[functionIndex] = codeRef;
671
672@@ -979,42 +1047,57 @@
673 qSwap(_function, function);
674 delete _as;
675 _as = oldAssembler;
676-@@ -1828,5 +1852,4 @@ void InstructionSelection::visitCJumpEqu
677+@@ -300,6 +324,11 @@ QQmlRefPointer<QV4::CompiledData::Compil
678+ return result;
679+ }
680+
681++QV4::CompiledData::CompilationUnit* InstructionSelection::mutableCompilationUnit()
682++{
683++ return compilationUnit.data();
684++}
685++
686+ void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result)
687+ {
688+ prepareCallData(args, 0);
689+@@ -1800,5 +1829,4 @@ void InstructionSelection::visitCJumpEqu
690 _block, trueBlock, falseBlock);
691 }
692
693 -
694 #endif // ENABLE(ASSEMBLER)
695-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4isel_masm_p.h
696+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4isel_masm_p.h
697 ===================================================================
698---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jit/qv4isel_masm_p.h
699-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jit/qv4isel_masm_p.h
700-@@ -73,6 +73,8 @@ public:
701+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jit/qv4isel_masm_p.h
702++++ qtdeclarative-opensource-src-5.4.0/src/qml/jit/qv4isel_masm_p.h
703+@@ -65,8 +65,11 @@ public:
704 virtual void run(int functionIndex);
705
706 const void *addConstantTable(QVector<QV4::Primitive> *values);
707 +
708 + virtual InstructionSelection* impl() { return this; };
709 protected:
710- virtual QV4::CompiledData::CompilationUnit *backendCompileStep();
711+ virtual QQmlRefPointer<QV4::CompiledData::CompilationUnit> backendCompileStep();
712++ virtual QV4::CompiledData::CompilationUnit* mutableCompilationUnit();
713
714-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4functionobject.cpp
715+ virtual void callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result);
716+ virtual void callBuiltinTypeofMember(IR::Expr *base, const QString &name, IR::Expr *result);
717+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4functionobject.cpp
718 ===================================================================
719---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jsruntime/qv4functionobject.cpp
720-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4functionobject.cpp
721-@@ -234,6 +234,7 @@ ReturnedValue FunctionCtor::construct(Ma
722+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jsruntime/qv4functionobject.cpp
723++++ qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4functionobject.cpp
724+@@ -226,6 +226,7 @@ ReturnedValue FunctionCtor::construct(Ma
725
726 QV4::Compiler::JSUnitGenerator jsGenerator(&module);
727 QScopedPointer<EvalInstructionSelection> isel(v4->iselFactory->create(QQmlEnginePrivate::get(v4), v4->executableAllocator, &module, &jsGenerator));
728 + isel->setEngine(QQmlEnginePrivate::get(v4));
729- QV4::CompiledData::CompilationUnit *compilationUnit = isel->compile();
730+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit = isel->compile();
731 QV4::Function *vmf = compilationUnit->linkToEngine(v4);
732
733-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4qobjectwrapper.cpp
734+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4qobjectwrapper.cpp
735 ===================================================================
736---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jsruntime/qv4qobjectwrapper.cpp
737-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4qobjectwrapper.cpp
738-@@ -628,6 +628,7 @@ ReturnedValue QObjectWrapper::getPropert
739+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jsruntime/qv4qobjectwrapper.cpp
740++++ qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4qobjectwrapper.cpp
741+@@ -629,6 +629,7 @@ ReturnedValue QObjectWrapper::getPropert
742 QQmlPropertyCache *cache = ddata->propertyCache;
743 Q_ASSERT(cache);
744 QQmlPropertyData *property = cache->property(propertyIndex);
745@@ -1022,19 +1105,19 @@
746 Q_ASSERT(property); // We resolved this property earlier, so it better exist!
747 return getProperty(object, ctx, property, captureRequired);
748 }
749-Index: qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4script.cpp
750+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4script.cpp
751 ===================================================================
752---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/jsruntime/qv4script.cpp
753-+++ qtdeclarative-opensource-src-5.3.2/src/qml/jsruntime/qv4script.cpp
754-@@ -272,6 +272,7 @@ void Script::parse()
755+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jsruntime/qv4script.cpp
756++++ qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4script.cpp
757+@@ -259,6 +259,7 @@ void Script::parse()
758 QScopedPointer<EvalInstructionSelection> isel(v4->iselFactory->create(QQmlEnginePrivate::get(v4), v4->executableAllocator, &module, &jsGenerator));
759 if (inheritContext)
760 isel->setUseFastLookups(false);
761 + isel->setEngine(QQmlEnginePrivate::get(v4));
762- QV4::CompiledData::CompilationUnit *compilationUnit = isel->compile();
763+ QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit = isel->compile();
764 vmFunction = compilationUnit->linkToEngine(v4);
765- ScopedValue holder(valueScope, new (v4->memoryManager) CompilationUnitHolder(v4, compilationUnit));
766-@@ -394,6 +395,7 @@ QV4::CompiledData::CompilationUnit *Scri
767+ ScopedObject holder(valueScope, v4->memoryManager->alloc<CompilationUnitHolder>(v4, compilationUnit));
768+@@ -360,6 +361,7 @@ QQmlRefPointer<QV4::CompiledData::Compil
769
770 QScopedPointer<EvalInstructionSelection> isel(engine->iselFactory->create(QQmlEnginePrivate::get(engine), engine->executableAllocator, module, unitGenerator));
771 isel->setUseFastLookups(false);
772@@ -1042,11 +1125,11 @@
773 return isel->compile(/*generate unit data*/false);
774 }
775
776-Index: qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmlengine.cpp
777+Index: qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmlengine.cpp
778 ===================================================================
779---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/qml/qqmlengine.cpp
780-+++ qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmlengine.cpp
781-@@ -561,7 +561,8 @@ QQmlEnginePrivate::QQmlEnginePrivate(QQm
782+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/qml/qqmlengine.cpp
783++++ qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmlengine.cpp
784+@@ -559,7 +559,8 @@ QQmlEnginePrivate::QQmlEnginePrivate(QQm
785 activeObjectCreator(0),
786 networkAccessManager(0), networkAccessManagerFactory(0), urlInterceptor(0),
787 scarceResourcesRefCount(0), typeLoader(e), importDatabase(e), uniqueId(1),
788@@ -1056,12 +1139,12 @@
789 {
790 useNewCompiler = true;
791 }
792-Index: qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmlengine_p.h
793+Index: qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmlengine_p.h
794 ===================================================================
795---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/qml/qqmlengine_p.h
796-+++ qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmlengine_p.h
797-@@ -270,6 +270,8 @@ public:
798-
799+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/qml/qqmlengine_p.h
800++++ qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmlengine_p.h
801+@@ -263,6 +263,8 @@ public:
802+ mutable QMutex networkAccessManagerMutex;
803 mutable QMutex mutex;
804
805 + int qmlCacheValid;
806@@ -1069,11 +1152,11 @@
807 private:
808 // Locker locks the QQmlEnginePrivate data structures for read and write, if necessary.
809 // Currently, locking is only necessary if the threaded loader is running concurrently. If it is
810-Index: qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmljavascriptexpression.cpp
811+Index: qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmljavascriptexpression.cpp
812 ===================================================================
813---- qtdeclarative-opensource-src-5.3.2.orig/src/qml/qml/qqmljavascriptexpression.cpp
814-+++ qtdeclarative-opensource-src-5.3.2/src/qml/qml/qqmljavascriptexpression.cpp
815-@@ -335,6 +335,7 @@ QV4::ReturnedValue QQmlJavaScriptExpress
816+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/qml/qqmljavascriptexpression.cpp
817++++ qtdeclarative-opensource-src-5.4.0/src/qml/qml/qqmljavascriptexpression.cpp
818+@@ -327,6 +327,7 @@ QV4::ReturnedValue QQmlJavaScriptExpress
819
820 QV4::ScopedObject qmlScopeObject(scope, QV4::QmlContextWrapper::qmlScope(ep->v8engine(), ctxt, qmlScope));
821 QV4::Script script(v4, qmlScopeObject, code, filename, line);
822@@ -1081,3 +1164,33 @@
823 QV4::ScopedValue result(scope);
824 script.parse();
825 if (!v4->hasException)
826+Index: qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_moth.cpp
827+===================================================================
828+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/compiler/qv4isel_moth.cpp
829++++ qtdeclarative-opensource-src-5.4.0/src/qml/compiler/qv4isel_moth.cpp
830+@@ -457,6 +457,11 @@ QQmlRefPointer<QV4::CompiledData::Compil
831+ return result;
832+ }
833+
834++QV4::CompiledData::CompilationUnit* InstructionSelection::mutableCompilationUnit()
835++{
836++ return compilationUnit.data();
837++}
838++
839+ void InstructionSelection::callValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result)
840+ {
841+ Instruction::CallValue call;
842+Index: qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4global_p.h
843+===================================================================
844+--- qtdeclarative-opensource-src-5.4.0.orig/src/qml/jsruntime/qv4global_p.h
845++++ qtdeclarative-opensource-src-5.4.0/src/qml/jsruntime/qv4global_p.h
846+@@ -96,6 +96,9 @@ inline double trunc(double d) { return d
847+ #define ENABLE_YARR_JIT 1
848+ #define ENABLE_JIT 1
849+ #define ENABLE_ASSEMBLER 1
850++#if defined(V4_UNIT_CACHE)
851++ #define ENABLE_UNIT_CACHE 1
852++#endif
853+ #else
854+ #define ENABLE_YARR_JIT 0
855+ #define ENABLE_ASSEMBLER 0
856
857=== modified file 'debian/patches/series'
858--- debian/patches/series 2015-02-10 12:14:13 +0000
859+++ debian/patches/series 2015-02-26 09:47:31 +0000
860@@ -4,4 +4,4 @@
861 ppc64el.patch
862 Support-RFC2822Date-date-format-similar-to-V8.patch
863 Fix-regression-where-QQuickScreenAttached-overwrites.patch
864-#QML-Compilation-unit-caching-and-JIT-changes.patch
865+QML-Compilation-unit-caching-and-JIT-changes.patch
866
867=== modified file 'debian/rules'
868--- debian/rules 2015-02-04 15:00:17 +0000
869+++ debian/rules 2015-02-26 09:47:31 +0000
870@@ -4,12 +4,16 @@
871 #export DH_VERBOSE=1
872
873 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
874+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
875
876 export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
877 export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
878 export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
879 export QT_SELECT := qt5
880
881+# Skip tests on the archs they are known to be flaky with current configuration
882+testskip_architectures := powerpc
883+
884 %:
885 dh $@ --parallel --with pkgkde_symbolshelper --dbg-package=qtdeclarative5-dbg
886
887@@ -64,5 +68,8 @@
888 cp -a src/imports/testlib/TestCase.qml qml/QtTest
889 cp -a src/imports/testlib/SignalSpy.qml qml/QtTest
890 cp -a src/imports/testlib/testlogger.js qml/QtTest
891+ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(testskip_architectures)))
892+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
893 xvfb-run -a -s "-screen 0 1024x768x24" dh_auto_test -- QT_PLUGIN_PATH=$(CURDIR)/plugins LD_LIBRARY_PATH=$(CURDIR)/lib QML2_IMPORT_PATH=$(CURDIR)/qml
894-
895+endif
896+endif

Subscribers

People subscribed via source and target branches