aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsmemorypool_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Move the memory pool into the common codeUlf Hermann2019-07-081-256/+0
| | | | | | | We need it in both, the compiler and the runtime. Change-Id: Iffacb9d150bf9eef6ef477bfd427dbac9bf49359 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Eliminate QT_QML_BEGIN_NAMESPACE and QT_QML_END_NAMESPACEShawn Rutledge2019-03-221-2/+2
| | | | | | | These are equivalent to the usual namespace macros. Change-Id: I3891397511e29694fe508414e77eb8483b877e03 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: Move the FixedPoolArray into the MemoryPool headerErik Verbruggen2019-01-251-0/+77
| | | | | | | So now the FixedPoolArray can be re-used in other places. Change-Id: I0e0504892944722a0c18f207dc6400d5b314f6ae Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix failing assertion in memory pool allocator in large QML scenesVitaly Fanaskov2018-11-281-6/+8
| | | | | | | | | | | | | | | | | | In the previous implementation MemoryPool wasn't able to allocate more memory than predefined block size (8 kB). Now, if a user tries to allocate more memory than default block size, the block size will be increased for current block only. All remain space in a new block will be used according to the current allocation strategy. Increasing block size of some certain blocks doesn't lead to reallocation of the entire memory pool. Also this situation happens very rarely, e.g., when compiling something contains more than approx. 2500 objects. Also fixed some warnings and used more casts in C++ style. Fixes: QTBUG-71195 Change-Id: I65d57959849f282178cffc92285a6a32f6bb9b25 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix string memory leak in JavaScript ASTSimon Hausmann2018-06-251-0/+7
| | | | | | | | | | | | | Commit 02252ae08d introduced a QString member in a JS memory pool class, which leaks unfortunately as the pool is not designed to call destructors of allocated types. Typically strings in the AST are derived from input and therefore a QStringRef is fine. The bindingIdentifier in the PatterElement however is sometimes synthesized, so a separate storage for dynamically allocated strings in the memory pool allows for using QStringRef again. Change-Id: I94d090df653d784c554452722b3b759031e4735b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cosmetic cleanupLars Knoll2018-05-031-5/+3
| | | | | Change-Id: Idbd34a8c87a52ec78d5680bfab0a75d1430bb0b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-12/+6
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-5/+5
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-251-1/+4
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| * QML: Check for failing realloc/malloc in the QmlJS memory poolErik Verbruggen2016-11-151-1/+4
| | | | | | | | | | | | | | | | | | This should make (properly functioning) static code checkers stop complaining. Task-number: QTBUG-57025 Change-Id: Ic7e6f1b0b02f2e9324dbc891ab4620d53d9f9a18 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | V4: Allow the compiler to inline more small methods.Erik Verbruggen2016-03-201-2/+2
| | | | | | | | | | Change-Id: Ib2dc03a2535fcbdb10be2dab39593e8dc224fd93 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove prohibited uses of underscore + capital letterThiago Macieira2016-01-081-1/+1
| | | | | | | | | | | | | | All identifiers starting with an underscore and a capital letter are reserved to the compiler and must never be used by the user code. Try to find a better name or, in the worst case, move the underscore to the last position in these identifiers. See commit cf63c63d558227fdbef09699c261560e7474f5ea in qtbase for a case of such an identifier causing a build breakage when the compiler began treating it specially (it was _Nullable). Change-Id: I1d0f78915b5942aab07cffff140f9f39c29f0fdf Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Remove unused codeFrank Meerkoetter2015-08-021-22/+0
| | | | | | | There are no users of this visitor interface left. Change-Id: I8d912c3441bd8a67293eee443451dcea392308ee Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix marking of prototype objects in internal class poolSimon Hausmann2014-04-281-0/+24
| | | | | | | | | | As per reported bug, we have to protect ourselves against potential loops and can mark the internal classes much simpler by just walking through the memory pool they were allocated in. Task-number: QTBUG-38299 Change-Id: I3ae96e8082e76d06f4321c5aa6d2e9645d2830a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Add support for implicitly defined componentsSimon Hausmann2014-01-101-0/+2
| | | | | | | | | | | | | | | Use-cases like itemDelegate: Item { ... } implicitly define a component without the item-surrounding Component {}, base on the fact that the property itself is of type QQmlComponent (or derived). This means we have to synthesize a Component {} object and insert it into the data structure. Change-Id: I8992451a5a6732c7fd898eaf83c276dc6a8b7d19 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move the parser folder from src/qml/qml to src/qmlLars Knoll2013-08-081-0/+173
Change-Id: I5e5684f5b98b00f791ade99c4cb6bc2ed880ad6a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>