aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4persistent_p.h
Commit message (Collapse)AuthorAgeFilesLines
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-4/+4
| | | | | | | | 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-10/+10
| | | | | | | | | | | | | 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>
* Separate the stack used for GC from the regular JS stackLars Knoll2017-04-071-2/+2
| | | | | | | | This is required to be able to implement concurrent or incremental garbage collection. Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Create a fast-path for QV4::WeakValue::setErik Verbruggen2016-10-211-3/+22
| | | | | | | And hint the compiler (with LTO) to never inline the slow path. Change-Id: Idad15498bca457d3f1f063031ad1a08415e9b3db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: tighten up various casts to check also check type.Erik Verbruggen2016-06-081-2/+2
| | | | | | | | | | All those type conversions assumed that the content of a Value was either the requested type, or 0 (zero, a null pointer). Now, attempting to convert e.g. undefined to a string will fail, instead of returning a weird address. Change-Id: I0f567cdcc9cc9728d019f17693f4a6007394a9c6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-4/+4
|\ | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Make sure we destroy all QV4::QObjectWrapper objectsJian Liang2016-01-221-4/+4
| | | | | | | | | | | | | | | | | | | | Delay freeing QObjectWrapper Value to MemoryManager::sweep() to make sure we can destroy all QObjectWrapper objects. We also keep track of QObjectWrapper in QV4::Heap::ModelObject to make sure we destory them in QV4::MemoryManager::sweep() Change-Id: I3a8a3b07faab1f88c2eb746f68aa8d9584b40026 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>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make iteration over persistent values saferLars Knoll2015-08-241-2/+6
| | | | | | | | This makes it safe to destruct persistents while we are iterating over them. Change-Id: I8797d0c553d3201859cdf03fb25df28836e55691 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix the RegExpCache to be GC safeLars Knoll2015-06-171-0/+7
| | | | | Change-Id: I6c20c2c5fcdaefa0743f7c1f50cf6dd8d8edc753 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of StringValue usage in QJSValueIteratorLars Knoll2015-06-101-0/+6
| | | | | Change-Id: I86badf9944b335041d16423be9a5434d1098cbb0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-241-0/+1
| | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of asManaged()Lars Knoll2015-04-211-2/+2
| | | | | Change-Id: I853417fdf1cc339f7d43a006c20e1626b6bfb288 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Reduce dependenciesLars Knoll2015-03-201-1/+1
| | | | | Change-Id: I4190c1a6d8a06a130e50cb727feafa7cf11f21cd 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>
* Remove all remaining usages of ValueRefLars Knoll2015-01-231-2/+0
| | | | | Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-3/+4
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Refactor persistent valuesLars Knoll2015-01-161-54/+66
| | | | | | | | | | Use a page wise allocation mechanism for persistent values. This significantly reduces memory consumption of persistent values and also improves their performance a lot. Change-Id: I8499d2ca5bdd871e029f643ae605a94544558bb5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make sure we always have an engine when assigning to a PersistentLars Knoll2015-01-131-14/+15
| | | | | | | This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the remaining uses of Returned<T>Simon Hausmann2014-11-151-8/+0
| | | | | Change-Id: I493b75365d3c6fbf6965986d73e7aa0b659ded67 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup debugger to be safe for the new GCLars Knoll2014-11-121-0/+6
| | | | | | | Added a bit of convenience to PersistentValue as well. Change-Id: I5a858079543b41ce1ef48a84e9350a7d6fa64501 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-18/+10
| | | | | | | | | - 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>
* Get rid of ManagedRefLars Knoll2014-07-221-2/+0
| | | | | Change-Id: I6883fc5d8c5a13f1e61966c9f6e7bf0bedbfbc8a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make the Ref classes not template basedLars Knoll2014-02-071-4/+3
| | | | | | | | | | Move to a class hierarchy that mirrors the main classes. This will allow moving functionality over into the Ref classes, as the current Managed classes become mainly something that holds the data. This is required to make objects movable by the GC. Change-Id: I4ca88ab0e5d8c88c8dc56d51937990500a33e0d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename Referenced to ManagedRefLars Knoll2014-02-071-2/+2
| | | | | | | | | | First step of removing the templates here and turning this into a class hierarchy. This is required, so we can move all member methods into the Ref classes and make objects movable during GC. Change-Id: Ie14af07fd3e72a7d84a528d0042189ff12ba21bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move PersistenValue and WeakValue into it's own fileLars Knoll2014-02-051-0/+168
They deserve having their own set of files, and it helps reduce dependencies. Change-Id: Ifd4394f88ef51cbccc61bf92dd20636f570141d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>