| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | template<typename T, int Step> | - |
| 6 | class QRecyclePoolPrivate | - |
| 7 | { | - |
| 8 | public: | - |
| 9 | QRecyclePoolPrivate() | - |
| 10 | : recyclePoolHold(true), outstandingItems(0), cookie(0x33218ADF), | - |
| 11 | currentPage(nullptr), nextAllocated(nullptr) | - |
| 12 | { | - |
| 13 | } never executed: end of block | 0 |
| 14 | | - |
| 15 | bool recyclePoolHold; | - |
| 16 | int outstandingItems; | - |
| 17 | quint32 cookie; | - |
| 18 | | - |
| 19 | struct PoolType : public T { | - |
| 20 | union { | - |
| 21 | QRecyclePoolPrivate<T, Step> *pool; | - |
| 22 | PoolType *nextAllocated; | - |
| 23 | }; | - |
| 24 | }; | - |
| 25 | | - |
| 26 | struct Page { | - |
| 27 | Page *nextPage; | - |
| 28 | unsigned int free; | - |
| 29 | union { | - |
| 30 | char array[Step * sizeof(PoolType)]; | - |
| 31 | qint64 q_for_alignment_1; | - |
| 32 | double q_for_alignment_2; | - |
| 33 | }; | - |
| 34 | }; | - |
| 35 | | - |
| 36 | Page *currentPage; | - |
| 37 | PoolType *nextAllocated; | - |
| 38 | | - |
| 39 | inline T *allocate(); | - |
| 40 | static inline void dispose(T *); | - |
| 41 | inline void releaseIfPossible(); | - |
| 42 | }; | - |
| 43 | | - |
| 44 | template<typename T, int Step = 1024> | - |
| 45 | class QRecyclePool | - |
| 46 | { | - |
| 47 | public: | - |
| 48 | inline QRecyclePool(); | - |
| 49 | inline ~QRecyclePool(); | - |
| 50 | | - |
| 51 | inline T *New(); | - |
| 52 | template<typename T1> | - |
| 53 | inline T *New(const T1 &); | - |
| 54 | template<typename T1> | - |
| 55 | inline T *New(T1 &); | - |
| 56 | | - |
| 57 | static inline void Delete(T *); | - |
| 58 | | - |
| 59 | private: | - |
| 60 | QRecyclePoolPrivate<T, Step> *d; | - |
| 61 | }; | - |
| 62 | | - |
| 63 | template<typename T, int Step> | - |
| 64 | QRecyclePool<T, Step>::QRecyclePool() | - |
| 65 | : d(new QRecyclePoolPrivate<T, Step>()) | - |
| 66 | { | - |
| 67 | } never executed: end of block | 0 |
| 68 | | - |
| 69 | template<typename T, int Step> | - |
| 70 | QRecyclePool<T, Step>::~QRecyclePool() | - |
| 71 | { | - |
| 72 | d->recyclePoolHold = false; | - |
| 73 | d->releaseIfPossible(); | - |
| 74 | } never executed: end of block | 0 |
| 75 | | - |
| 76 | template<typename T, int Step> | - |
| 77 | T *QRecyclePool<T, Step>::New() | - |
| 78 | { | - |
| 79 | T *rv = d->allocate(); | - |
| 80 | new (rv) T; | - |
| 81 | return never executed: return rv; rv;never executed: return rv; | 0 |
| 82 | } | - |
| 83 | | - |
| 84 | template<typename T, int Step> | - |
| 85 | template<typename T1> | - |
| 86 | T *QRecyclePool<T, Step>::New(const T1 &a) | - |
| 87 | { | - |
| 88 | T *rv = d->allocate(); | - |
| 89 | new (rv) T(a); | - |
| 90 | return never executed: return rv; rv;never executed: return rv; | 0 |
| 91 | } | - |
| 92 | | - |
| 93 | template<typename T, int Step> | - |
| 94 | template<typename T1> | - |
| 95 | T *QRecyclePool<T, Step>::New(T1 &a) | - |
| 96 | { | - |
| 97 | T *rv = d->allocate(); | - |
| 98 | new (rv) T(a); | - |
| 99 | returnexecuted 926499 times by 114 tests: return rv;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
rv;executed 926499 times by 114 tests: return rv;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 926499 |
| 100 | } | - |
| 101 | | - |
| 102 | template<typename T, int Step> | - |
| 103 | void QRecyclePool<T, Step>::Delete(T *t) | - |
| 104 | { | - |
| 105 | t->~T(); | - |
| 106 | QRecyclePoolPrivate<T, Step>::dispose(t); | - |
| 107 | }executed 845675 times by 113 tests: end of blockExecuted by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 845675 |
| 108 | | - |
| 109 | template<typename T, int Step> | - |
| 110 | void QRecyclePoolPrivate<T, Step>::releaseIfPossible() | - |
| 111 | { | - |
| 112 | if (recyclePoolHold| TRUE | evaluated 821917 times by 112 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlstatemachine
- ...
| | FALSE | evaluated 23758 times by 9 testsEvaluated by:- tst_qqmlecmascript
- tst_qqmlinstantiator
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
|
|| outstandingItems| TRUE | evaluated 23499 times by 9 testsEvaluated by:- tst_qqmlecmascript
- tst_qqmlinstantiator
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
| | FALSE | evaluated 259 times by 8 testsEvaluated by:- tst_qqmlecmascript
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
|
) | 259-821917 |
| 113 | return;executed 845416 times by 113 tests: return;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 845416 |
| 114 | | - |
| 115 | Page *p = currentPage; | - |
| 116 | while (p| TRUE | evaluated 265 times by 8 testsEvaluated by:- tst_qqmlecmascript
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
| | FALSE | evaluated 259 times by 8 testsEvaluated by:- tst_qqmlecmascript
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
|
) { | 259-265 |
| 117 | Page *n = p->nextPage; | - |
| 118 | free(p); | - |
| 119 | p = n; | - |
| 120 | }executed 265 times by 8 tests: end of blockExecuted by:- tst_qqmlecmascript
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
| 265 |
| 121 | | - |
| 122 | delete this; | - |
| 123 | }executed 259 times by 8 tests: end of blockExecuted by:- tst_qqmlecmascript
- tst_qquickgridview
- tst_qquickitem2
- tst_qquicklistview
- tst_qquickpathview
- tst_qquickpositioners
- tst_qquickrepeater
- tst_qquickvisualdatamodel
| 259 |
| 124 | | - |
| 125 | template<typename T, int Step> | - |
| 126 | T *QRecyclePoolPrivate<T, Step>::allocate() | - |
| 127 | { | - |
| 128 | PoolType *rv = nullptr; | - |
| 129 | if (nextAllocated| TRUE | evaluated 609254 times by 36 testsEvaluated by:- tst_examples
- tst_flickableinterop
- tst_qmldiskcache
- tst_qqmlbinding
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlitemmodels
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlvaluetypes
- tst_qquickanimations
- tst_qquickbehaviors
- tst_qquickdesignersupport
- tst_qquickdrag
- tst_qquickdraghandler
- tst_qquickdroparea
- tst_qquickflickable
- tst_qquickgridview
- tst_qquickimage
- tst_qquickitem2
- tst_qquicklayouts
- ...
| | FALSE | evaluated 317245 times by 114 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
|
) { | 317245-609254 |
| 130 | rv = nextAllocated; | - |
| 131 | nextAllocated = rv->nextAllocated; | - |
| 132 | }executed 609254 times by 36 tests: end of blockExecuted by:- tst_examples
- tst_flickableinterop
- tst_qmldiskcache
- tst_qqmlbinding
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlitemmodels
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlvaluetypes
- tst_qquickanimations
- tst_qquickbehaviors
- tst_qquickdesignersupport
- tst_qquickdrag
- tst_qquickdraghandler
- tst_qquickdroparea
- tst_qquickflickable
- tst_qquickgridview
- tst_qquickimage
- tst_qquickitem2
- tst_qquicklayouts
- ...
else if (currentPage| TRUE | evaluated 313735 times by 93 testsEvaluated by:- tst_bindingdependencyapi
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlstatemachine
- ...
| | FALSE | evaluated 3510 times by 114 testsEvaluated by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
|
&& currentPage->free| TRUE | evaluated 313633 times by 93 testsEvaluated by:- tst_bindingdependencyapi
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlstatemachine
- ...
| | FALSE | evaluated 102 times by 5 testsEvaluated by:- tst_examples
- tst_qqmlnotifier
- tst_qquickgridview
- tst_qquicklistview
- tst_scenegraph
|
) { | 102-609254 |
| 133 | rv = (PoolType *)(currentPage->array + (Step - currentPage->free) * sizeof(PoolType)); | - |
| 134 | currentPage->free--; | - |
| 135 | }executed 313633 times by 93 tests: end of blockExecuted by:- tst_bindingdependencyapi
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- tst_qqmlstatemachine
- ...
else { | 313633 |
| 136 | Page *p = (Page *)malloc(sizeof(Page)); | - |
| 137 | p->nextPage = currentPage; | - |
| 138 | p->free = Step; | - |
| 139 | currentPage = p; | - |
| 140 | | - |
| 141 | rv = (PoolType *)currentPage->array; | - |
| 142 | currentPage->free--; | - |
| 143 | }executed 3612 times by 114 tests: end of blockExecuted by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 3612 |
| 144 | | - |
| 145 | rv->pool = this; | - |
| 146 | ++outstandingItems; | - |
| 147 | returnexecuted 926499 times by 114 tests: return rv;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
rv;executed 926499 times by 114 tests: return rv;Executed by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 926499 |
| 148 | } | - |
| 149 | | - |
| 150 | template<typename T, int Step> | - |
| 151 | void QRecyclePoolPrivate<T, Step>::dispose(T *t) | - |
| 152 | { | - |
| 153 | PoolType *pt = static_cast<PoolType *>(t); | - |
| 154 | ((pt->pool && pt->pool->cookie == 0x33218ADF) ? static_cast<void>(0) : qt_assert("pt->pool && pt->pool->cookie == QRECYCLEPOOLCOOKIE", __FILE__, 207)); | - |
| 155 | | - |
| 156 | QRecyclePoolPrivate<T, Step> *This = pt->pool; | - |
| 157 | pt->nextAllocated = This->nextAllocated; | - |
| 158 | This->nextAllocated = pt; | - |
| 159 | --This->outstandingItems; | - |
| 160 | This->releaseIfPossible(); | - |
| 161 | }executed 845675 times by 113 tests: end of blockExecuted by:- tst_bindingdependencyapi
- tst_drawingmodes
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qmlcachegen
- tst_qmldiskcache
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistreference
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlproperty
- tst_qqmlpropertymap
- tst_qqmlqt
- ...
| 845675 |
| 162 | | - |
| 163 | | - |
| | |