aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sparsearray.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: Remove unused includes in qml, final partSemih Yavuz2022-09-141-4/+0
| | | | | | | | | | | | | | Drop unnecessary includes detected by clangd-iwyu. Add new includes due to the transitive includes. Also, some of the includes were detected as unused even if they were actually in use. In those cases, use angular brackets instead of "" which deceives the tool not to complain. Affected subfolders: JsRuntime, Qml Fixes: QTBUG-106473 Change-Id: I483da15d42a8e3ce6cd3b654909665fff3075d6b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace usage of Q_ALIGNOF with alignofVolker Hilsheimer2019-10-211-1/+1
| | | | | | | | | | Q_ALIGNOF is no longer needed as alignof is part of the C++11 standard, and will be removed from Qt 6. Task-number: QTBUG-76414 Change-Id: I2fdb84de7fa7342c5d032b7679be7ba6bbaf3b40 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't use empty values anymore to store internal freelistsLars Knoll2018-05-241-1/+1
| | | | | | | | | | | | Simply encode them as integers. That works just as well, and allows removing the indexed empty values. This is helpful, to swap the internal representations of undefined and empty values, which in turn will simplify an implementation of correct handling of uninitialized variables (through let/const). Change-Id: I299f975d665309611d1b561f6a0c86b5ca15782a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-20/+20
| | | | | | | | | | | | | 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>
* Fix crash when changing from a simple to a sparse arrayLars Knoll2018-02-151-0/+1
| | | | | | | | | After that change, if we ran out of slots in the freeList, the last entry would point to the first Value in the value array, not indicating that we ran out of free slots. Task-number: QTBUG-65828 Change-Id: I3e57bb7a0c2dc29172a485a6ea957b6ab5ac962e
* Move the freeList from Heap::ArrayData to SparseArrayLars Knoll2018-01-151-0/+1
| | | | | | | It's only used for sparse arrays, so the data should live there. Change-Id: I9ca04c73dd2dbebf459ee64c164a69681623a351 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* 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>
* V4: Fix SparseArray::deleteNodeRon Hashimoto2015-09-251-7/+4
| | | | | | | | | SparseArray::deleteNode should modify size_left only if the deleted node had a right child Change-Id: I0f3504a5c6568dbd9e392bf83eaf3f9780eb2b84 Task-number: QTBUG-46022 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>
* Move ArrayElementLessThen to qv4arraydata.cppLars Knoll2014-01-311-26/+0
| | | | | | | This is the only place the class gets used. Change-Id: Iebb0cba7af30c1b2da68f67596c349d5e20c5053 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Save memory on array dataLars Knoll2014-01-201-7/+7
| | | | | | | | | | | | | | | | | | | | | Store a simple vector of Values in the array data, instead of a Vector of Property's. This halfes the memory consumption on 64bit and simplifies our code. If an indexed property gets converted to an accessor property, we simply convert the ArrayData into a SparseArrayData. Add support in SparseArrayData to allocate double slots (two Value's) to hold a full Property in case someone sets an accessor on an indexed property. Some methods still return a Property*, but this is safe, as only the first Value in the Property pointer will ever get accessed if the Property doesn't contain an accessor. Change-Id: Ic9b0f309b09a2772a328d947a10faaf3be9fe56f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixes to sparse array handlingLars Knoll2014-01-201-32/+32
| | | | | | | | | | deleting entries in sparse arrays could lead to rather unexpected results where values got moved to wrong indices, as we didn't correctly update the size_left values in the red-black tree. Change-Id: If71fcc04d39f257194394cb4f734d0db14b92b69 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix small bug in array sortingLars Knoll2013-11-181-3/+3
| | | | | | | Task-number: QTBUG-34321 Change-Id: I33089499f730bce16a9dfdda04cc8402602bc5fa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix the remaining objects against self destructionLars Knoll2013-10-111-1/+3
| | | | | | | | This makes pretty much all test cases pass with exact garbage collection. Change-Id: Ia874e3c17c3984afb7cfe370f9bd3ad8fe46699a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-281-1/+1
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert the last methods in qv4object_p.hLars Knoll2013-09-221-2/+4
| | | | | | Change-Id: I4fda83a0832760c277e629d4e658da718c0bf92b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename QV4::ValueScope to QV4::ScopeLars Knoll2013-09-181-1/+1
| | | | | | | | The class is going to be used all over the place, so let's give it a short name :) Change-Id: If61543cb2c885e7fbb95c8fc4d0e870097c352ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Require a ValueScope for ScopedCallData as wellLars Knoll2013-09-181-1/+1
| | | | | | | | This brings things more in line with ScopedValue, and also simplifies cleanup of Scoped values. Change-Id: If5f1466b4e13c629d56c1e7c638937f61ba48f77 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QV4::ReturnedValue in the runtime APILars Knoll2013-09-121-3/+5
| | | | | | | | This makes function calls from the JIT/Moth into the runtime significantly nicer. Change-Id: Ie7d7123984d65c0bee0525d3d28c643a76b394c4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* More work on converting calling conventions to fit the new GC schemeLars Knoll2013-09-111-1/+1
| | | | | Change-Id: I4283cc85ad599b62a8efbe9268680287cf74097e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Generate CallData structures directly in the instruction selectionLars Knoll2013-09-111-8/+10
| | | | | | | | | Like this we can hand the CallData through the runtime methods without any need to modify them. This simplifies the code in there, and should also speed them up to some degree. Change-Id: Ibd92ff4a8f279a5c4a054c5678646f658cfed5ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Restructure source codeLars Knoll2013-08-081-0/+459
Move the v4 engine classes from a subdir of qml/qml into two subdirs (compiler and jsruntime) of the qml module Remove an unsued qv4syntaxchecker class, and move the moth code directly into compiler. Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>