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