aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for white allocation during gc (5/9): SharedInternalClassDataFabian Kosmale2024-03-051-2/+2
| | | | | | | | | | Employ the new WriteBarrier::Pointer to ensure that MemberData is always protected. Change-Id: I3a6d0fddc8fc6d2056023da35c11559bb7701401 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* SharedInternalClassData: Mark newly inserted valuesFabian Kosmale2024-02-031-0/+18
| | | | | | | | | | | | If a Heap value is inserted into a SharedInternalClassData instance which was already marked, we would potentially never mark the entry at all. Note that this is only necessary for the PropertyKey specialization, as PropertyAttributes does not contain any heap values. Change-Id: I0da098936bcc940cd24123cb58a90b2ee4234f3f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-111-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* JSEngine: Optimize QV4InternalClass for tests on MSVCOlivier De Cannière2023-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running tst_ecmascripttests on MSVC in debug mode has become very slow and times out the CI. Analysing the program reveals that most of the slowdown is due to extensive wait times caused by locks. The test is run on all threads by default and this constant synchronization tanks performance. A large amount of these locks come from the fact that, in debug mode, MSVC standard containers use locks for most operations on iterators. This patch changes the container of the internal class transitions from an std::vector to a QVarLengthArray. This eliminates the iterator lock problem. The QVarLengthArray is given one inline entry to store a value. From the tests, it seems that the transitions contain only 0 or 1 entries about 84% of the time. In the remaining cases, more allocations will be needed. The additional entry will also increase the size of the containing object by 24 bytes. This should be a worthwhile tradeoff. This change alone has a significant impact on the duration of the tests. tst_ecmascripttests on 13900k with 32 threads Debug MSVC Windows Debug GCC Linux baseline: 2267s 104s QVarLengthArray 569s (~ -73%) 102s (~ -2%) This should be enough to no longer timeout the CI but many issues still remain. Change-Id: I69fefabc0375d76c817ef7d2d3b2e97dc1ace5bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML Debugger: Don't crash when looking up values from imported modulesUlf Hermann2023-10-241-1/+1
| | | | | | | | | | We cannot look up the imports from other modules because those are stored in the CU. But we can avoid the crash. Pick-to: 6.6 6.5 6.2 5.15 Fixes: QTBUG-117479 Change-Id: Ib5660c94dfb7ed20baedf7f71b2f175e6be042b1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow limited extensions to globalsUlf Hermann2022-09-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can allow a, overriding data members of globals, such as Error.name b, adding members that don't clash with any internals c, any manipulation of toString(), toLocaleString(), valueOf(), and constructor To that effect, add a "Locked" flag to our internal classes. If that is set, disallow changing prototypes and when defining a property, check if it shadows any non-configurable property. Furthermore, make all non-primitive properties that are not meant to be overridden non-configurable and non-writable. constructor, toString(), toLocaleString() and valueOf() are exempt because they are explicitly meant to be overridden by users. Therefore, we let that happen and refrain from optimizing them or triggering their implicit invocation in optimized code. [ChangeLog][QtQml][Important Behavior Changes] The JavaScript global objects are not frozen anymore in a QML engine. Instead, they are selectively locked. You can extend the objects with new members as long as you don't shadow any existing methods, and you can change or override data members. This also means that most methods of Object.prototype, which was previously exempt from the freezing, cannot be changed anymore. You can, however, change or override constructor, toString(), toLocaleString() and valueOf() on any prototype. Those are clearly meant to be overridden by user code. Fixes: QTBUG-101298 Task-number: QTBUG-84341 Change-Id: Id77db971f76c8f48b18e7a93607da5f947ecfc3e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Inline some PropertyAttribute storageUlf Hermann2022-08-301-4/+27
| | | | | | | | | As PropertyAttribute is only one byte long, we can fit 4 or 8 of them into the space the pointer needs. Doing so avoids some allocations. Change-Id: Icea975d51d16eca7d4ace74c5763ea261b0bb8ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Mark InternalClass parents when running GCUlf Hermann2022-08-031-13/+25
| | | | | | | | | | | | | | | | We need to preserve them as they notify us about protoId related changes. In order to avoid wasting heap space in case many properties are added and removed from the same object, we put a mechanism in place to rebuild the InternalClass hierarchy if many redundant transitions are detected. Amends commit 69d76d59cec0dcff4c52eef24e779fbef14beeca. Pick-to: 5.15 6.2 6.3 6.4 Fixes: QTBUG-91687 Task-number: QTBUG-58559 Change-Id: I3238931b5919ed2b98059e0b7f928334284ce7bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QV4:PropertyHash::removeIdentifier()Ulf Hermann2022-07-271-1/+0
| | | | | | | You cannot actually remove anything from these hashes. Change-Id: I4b08639f56e3198f48dac1fabfd324cca87c3fdc 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>
* Cleanup some includesFabian Kosmale2021-03-171-0/+1
| | | | | | | Some were superfluous, others were missing. Change-Id: I6bf3057f97ab3453d735cb7b90da945b8f6b993c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove dead codeRobert Loehning2020-05-191-4/+2
| | | | | Change-Id: I89cc47d20f07095b966b3d9758beafb99359aa2e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up frozen(), sealed(), nonExtensible() and propertiesFrozen()Ulf Hermann2019-05-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They all had some interesting bugs and duplicated each other: a, propertiesFrozen() changed each property individually, creating a lot of unnecessary intermediate classes. frozen() changed them all at once. b, If a class happened to contain only properties that matched the characteristics of being "sealed" or "frozen", sealed(), frozen() and propertiesFrozen() would set the flags in place and return the same class. This is bad because it violates the assumption that an InternalClass is immutable and it breaks the recursive freezing algorithm we rely on for the global object. It would stop freezing child objects at any such class, even if the children were not frozen. c, propertiesFrozen() did not set any of the flags even though it effectively sealed and froze the class. Therefore, when requesting the same class as frozen() it would iterate through all the properties again. d, frozen() implicitly also sealed the object and made it non-extensible. sealed() also implicitly made it non-extensible. This is impractical as we want to allow objects to be extensible even though all their properties are frozen. Therefore we only set the flag that belongs to each method now. We do know, however, that a frozen object is implicitly sealed. Therefore we can short-circuit this transition. Furthermore, we need to remove the assert in InternalClass::init() as you can indeed use frozen objects as prototypes for others, but that needs to be recorded in the original InternalClass via the isUsedAsProto flag. In order to set this flag, we need to perform a transition and therefore, derive from the old InternalClass. The JavaScript isFrozen() method asks for an _implicitly_, "duck typed", frozen state, which is different from what our "isFrozen" flag denotes. Therefore we add a separate const method that just checks whether all properties are frozen. Task-number: QTBUG-76033 Change-Id: I375fef83fb99035d470490fdf2348766b090831e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix clang-cl compiler warningsKai Koehne2019-04-081-1/+1
| | | | | | | | | | | | | clang-cl.exe 8.0.0 warns: qv4internalclass_p.h(460,19): warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend] The warning is most likely bogus (otherwise the code wouldn't compile on other platforms. But it's arguably not a bad idea to just qualify the friend declaration. Change-Id: Ia34119661c29cd8619adec70e9999cab2605ff32 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Check for numeric limits when growing SharedInternalClassDataPrivateUlf Hermann2019-03-271-2/+6
| | | | | | | | We can effectively only deal with values of < 2GB for m_alloc * sizeof(Data). This is not much more than the values seen in the wild. Change-Id: Ia6972df33d34a320b5b087d38db81aae24ce5bbe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Re-use existing IC when freezing propertiesUlf Hermann2019-03-271-1/+1
| | | | | | | | | | | | | There is no reason to start from the empty class in that case. Furthermore, if the properties are already frozen, starting from the empty class will walk the IC hierarchy to the current IC. However, if the garbage collector has removed the intermediate classes in the mean time, we end up at a new IC which is equivalent but not the same. Therefore, the freezing never terminates. Task-number: QTBUG-74190 Change-Id: Id544bd00d3b4b563fb06dfce0edd0385e1d32a6c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Trigger the garbage collector when allocating InternalClass objectsUlf Hermann2019-03-261-40/+17
| | | | | | | | | | | | | | | | | As we check the icAllocator's slots on shouldRunGC() we should also check shouldRunGC() when adding slots. Otherwise we might never run the GC when only allocating InternalClasses. In addition, account for the "unmanaged" size of the PropertyAttributes that are part of the InternalClass objects. Those can be large. In cases where an excessive number of large InternalClass objects is created the garbage collector is now invoked frequently, which costs a significant number of CPU cycles, but prevents the memory usage from growing indefinitely. Task-number: QTBUG-58559 Change-Id: Icf102cb6100f6dba212b8bffe1c178897880eda0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Refactor deletion of propertiesLars Knoll2018-09-271-11/+20
| | | | | | | | | | | | | In line with the previous commit, allow entries with a valid PropertyKey, but invalid attributes in the InternalClass. Those entries mark a deleted property. This cleans up/unifies some of the code in the internal class implementation and allows re-using the slot if a deleted property gets added again. Change-Id: I1bada697486e3cafce7689bae87b7f884200dd99 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Don't move any property slots in Objects anymoreLars Knoll2018-09-271-2/+7
| | | | | | | | | | | | | | | Until now, changing an existing property into an accessor property would cause the slots in the object to get re-arranged to make space for the additional setter required. Change this by dropping the requirement that getter and setter slot have to be next to each other. This has the advantage, that any slot we define to be at a certain position in the internal class/object will stay there and we can use that assumption to optimize accesses to the slot. Change-Id: Ib37c2a49fc6aae42ea4b2da36ac1dc3036540c12 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Get rid of remaining assumptions about setter being next to gettersLars Knoll2018-09-271-5/+25
| | | | | | | | The only place where we now assume that getters and setters are next to each other in the MemberData is in the internal class. Change-Id: I3285f3abb1cbfe051853e808339cd360eb602262 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Differentiate between finding for get and set in InternalClassLars Knoll2018-09-271-1/+14
| | | | | | | | This is required, so we can get rid of the requirement that getter and setter live next to each other in the member data. Change-Id: I2ed57a171628af4dfecd1836d00e958c6bed9d4f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Refactor InternalClass::find()Lars Knoll2018-09-271-1/+39
| | | | | | | | | Specialize find() into several methods for different purposes. Prepares for further cleanups and being able to split up getter and setter for accessor properties. Change-Id: Id4ec5509ac1a1361e2170bbfc2347b89b520c782 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Small refactoring of PropertyHash::lookup()Lars Knoll2018-09-271-7/+8
| | | | | Change-Id: I0c8cbf0914b8de4613ab203876636746f41d9718 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Store InternalClass::nameMap in a MemberDataLars Knoll2018-09-161-6/+33
| | | | | | | | | | This helps make that memory known to the GC as well, and makes marking of internal classes much more efficient, as we don't mark the property keys repeatedly (even if they are shared between different internal classes) Change-Id: Ibb7e5383672d7657926bd08bf13f73f7680a9f31 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor SharedIngternalClassDataLars Knoll2018-09-111-41/+74
| | | | | | | | | Prepare it to be able to specialize the private class for the property keys, to be able to improve performance of InternalClass::markObject() Change-Id: I8789f53b7d3377f6607fbc94e8475af5f14f2301 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Replace Identifier by PropertyKeyLars Knoll2018-07-021-15/+15
| | | | | | | | Change all uses of Identifier to use the new PropertyKey class and get rid of Identifier. Change-Id: Ib7e83b06a3c923235e145b6e083fe980dc240452 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Cleanups in the Identifier APILars Knoll2018-07-021-1/+1
| | | | | | | | | | Rename from/asHeapObject to from/asStringOrSymbol and fix the signature. Add a isStringOrSymbol() method and redefine isValid() to also include array indices. Change-Id: Ic8272bfbe84d15421e2ebe86ddda7fdaa8db4f3e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Garbage collect identifiersLars Knoll2018-05-021-3/+1
| | | | | | | | | | | | | | | | | | | | | Implemented by storing a backpointer to the Heap object in the identifier. Since identifiers now point back to their originating String or Symbol, we can now easily mark all identifiers that are still in use and collect those that aren't. Since Identifiers are 64bit also add support for holding an array index in there. With that an identifier can describe any kind of property that can be accessed in an object. This helps speed up and simplify some code paths. To make this possible, we need to register all IdentifierHash instances with the identifier table, so that we can properly mark those identifiers. Change-Id: Icadbaf5712ab9d252d4e71aa4a520e86b14cd2a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove String dependency from InternalClassLars Knoll2018-05-021-7/+4
| | | | | | | | This is required, so we can also use Symbols in the internal classes. Change-Id: I630e7aa7b8b16d5a94041f8d18515fd582f94264 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use Identifier by value and don't new them anymoreLars Knoll2018-05-021-12/+14
| | | | | Change-Id: Ib25c08027013217657beb2675dafa9a8c85cbaf9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Turn Identifier into a simple integerLars Knoll2018-05-021-1/+1
| | | | | | | | | | Add a reverse mapping table to the IdentifierHash to avoid having to store a hash value inside the identifier. This makes it possible to then use the identifiers value based and not new them on the heap anymore. Change-Id: If1f177588ea104565c6e3add49c70534a6c7dcb8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Reorganize Lookup data structure to make marking fasterLars Knoll2018-04-121-1/+1
| | | | | | | | | | Do this by always using odd numbers for protoId's, and putting those into the same place as the InternalClass pointers. That makes it possible to quickly check whether the lookup contains a pointer to a valid heap object. Change-Id: I330017b26c090b4dcbbcce1a127dca7ba7e148d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename InternalClass::id to protoIdLars Knoll2018-04-121-2/+2
| | | | | | | | It really identifies the 'revision' of the prototype chain that is being used with this internal class. Change-Id: Id5829c055cde2c1a2ca1032a7e831b3f0428774e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* garbage collect InternalClassLars Knoll2018-04-121-26/+38
| | | | | | | | | | | | | | | | Internal classes are now allocated and collected through the GC. As they are important to the deletion of other objects (because of the vtable pointer living inside the internal class), they need to get destroyed after regular objects have been sweeped. Achieve this by using a separate block allocator for internal class objects. Our lookups do often contain pointers to internal classes, so those need to be marked as well, so we don't accidentally collect them. Change-Id: I4762b054361c70c31f79f920f669ea0e8551601f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* InternalClass: Unify handling of sealed and frozen classesLars Knoll2018-04-121-3/+4
| | | | | | | | Unify the handling of sealed and frozen classes, and access them through the transition vector. Change-Id: I710cae04d717f42a8b8d4057dd1c60293043725b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove the pool allocator from InternalClassLars Knoll2018-04-121-8/+5
| | | | | | | | Makes it easier to transition it over to be controlled by the GC. Change-Id: I6bea738b3852abfc7870b71e639efc595eeb28fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-271-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/parser/qqmljslexer.cpp src/qml/qml/v8/qv8engine.cpp src/qml/util/qqmladaptormodel_p.h src/quick/items/qquickanimatedsprite.cpp tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp Change-Id: I16702b7a0da29c2a332afee47728d6a6ebf4fb3f
| * use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Change creation of new internal classesLars Knoll2018-02-091-8/+25
|/ | | | | | | | | | | | So far we often began with the empty class again when creating new internal classes. This allowed for multiple paths through the internal class hierarchy ending up at the same internal class object. But to be able to efficiently garbage collect internal classes, we need to have only one path to each instance of an internal class. Change-Id: Ic6c1f2b3d021e92b44f76a04a8886820e63e8f26 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a unique id to InternalClass that describes it's total stateLars Knoll2017-11-271-1/+9
| | | | | | | | | | | | | | | So far the InternalClass only did describe the state of the class itself, but it wouldn't change if some of the underlying objects in the prototype chain changed. This now fixes that and introduces a unique ID that completely describes the state of the object including all it's prototypes. This opens up for optimizing lookups down to one branch and a load, independent of the depth of the value inside the prototype chain. Change-Id: I0787e0e4710f2f6703b1d5e35996124b3db2d2da Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-061-25/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4argumentsobject.cpp src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4errorobject.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/jsruntime/qv4lookup.cpp src/qml/jsruntime/qv4managed.cpp src/qml/jsruntime/qv4managed_p.h src/qml/jsruntime/qv4object.cpp src/qml/jsruntime/qv4object_p.h src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4heap_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/memory/qv4mmdefs_p.h src/quick/scenegraph/util/qsgdistancefieldutil.cpp src/quick/scenegraph/util/qsgdistancefieldutil_p.h tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
| * Optimize marking of prototypes in the InternalClass treeLars Knoll2017-05-191-1/+0
| | | | | | | | | | | | | | | | | | There's no need to iterate over all internal classes, as prototype changes always happen in the first or second level of the tree. Change-Id: I99bf11a6cd238286c1547922d61ab47319b6eb97 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Optimize lookups in the internalClassLars Knoll2017-05-191-1/+8
| | | | | | | | | | | | | | | | Inline the version taking an identifier, and use that one where it makes sense. Change-Id: I414c5999e61cdba219ecd1080957f3037dfebc1b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Move the prototype into the internal classLars Knoll2017-05-191-8/+18
| | | | | | | | | | | | | | | | | | | | This saves another pointer on all Objects. Currently introduces a slight performance regression on some of the v8 benchmarks, that needs addressing. Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Move the internalClass field from Heap::Object to Heap::BaseLars Knoll2017-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | And do not store the vtable in Heap::Base anymore. This change makes the internal class the main distinguishing feature of all garbage collected objects. It also saves one pointer on all Objects. No measurable impact on runtime performance. Change-Id: I040a28b7581b993f1886b5219e279173dfa567e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add support for storing the Vtable in the InternalClassLars Knoll2017-05-191-17/+15
| | | | | | | | | | | | | | | | | | Prepare for moving the vtable pointer into the internalClass. This adds the required infrastructure to InternalClass, so it can store a vtable pointer and properly handles vtable changes. Change-Id: I688fee1647268dd185d0f9636ab5b3390465daca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Separate the stack used for GC from the regular JS stackLars Knoll2017-04-071-1/+1
|/ | | | | | | | This is required to be able to implement concurrent or incremental garbage collection. Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix memory leak in V4Gunnar Sletta2017-01-191-1/+1
| | | | | | | | | | | | | | | | | | Transitions contain both an id and a set of flags, but the sorting failed to take the flags into account in the operator<. As a result we would some times end up with duplicate entries if the same id was added multiple times with different flags. If the same id was added again and again with varying flags, this could lead to an ever expanding list filled with duplicate entries. Fix this by also taking flags into account in operator< so that operator< and operator== are symetric and the list gets correctly sorted. Change-Id: I762ec3f0c5b4ed9a1aecb9a883187a0445491591 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* QML: Allow for inlining InternalClass::findErik Verbruggen2016-07-151-1/+29
| | | | | | | | This method is used in ExecutionEngine::getProperty, which is called quite often. Change-Id: Ide49d158005ef1d9f51d1e734cf9e3b19f52cf26 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>