| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ibe0ef16609a704042b964b4c29078c462820e602
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, whenever the garbage collector runs, it will destroy all
valid tainted wrappers.
Only null or undefined wrappers will be preserved in the
m_multiplyWrappedQObjects map.
It seems like "!" was overlooked in
3b5d37ce3841c4bfdf1c629d33f0e33b881b47fb. Prior to that change, it
was "!it.value()->markBit()", so calling erase() in the then branch
did make sense. But with "!it.value().isNullOrUndefined()", erase()
will be called for every valid wrapper, which is the opposite what we
want.
Pick-to: 5.15 6.2
Change-Id: I2bf2630f538af8cbd4bfffcff29d67be6c278265
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Since Qt 6 requires at least C++17, we can finally make use of some of
its goodness.
Change-Id: I56a318bc0b1b60d1e2b0186f335f8feda7622df4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
|
|
|
|
|
|
|
| |
Some were superfluous, others were missing.
Change-Id: I6bf3057f97ab3453d735cb7b90da945b8f6b993c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove all qmake project files, except for examples which are used to
test that qmake continues to work.
Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
A destruction handler can cause a new object to be allocated during
garbage collection. Depending on where in the heap the object ends up,
it may be found during the sweep pass. As the mark pass had no chance to
mark the object, we need to set the mark bit right at allocation time in
this case.
Change-Id: Ie43eeb548e78bd375b001b3a6bb4ef6596f91980
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Since we depend on C++17 now, all of these can go.
Change-Id: I0484fd4bb99e4367ec211c29146c316453729959
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
You can wrap QObject pointers in plain JavaScript.
Change-Id: I246a72a7d5d7b2562e722bf9eafc7880b772a806
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assigning -1 to a quintptr so that it later overflows in another place
when adding 1 warrants a comment. Also, assert against i overflowing the
bitmaps.
This way coverity might also understand what we are doing.
Coverity-Id: 175402
Pick-to: 5.15
Pick-to: 5.12
Change-Id: I212110cbb784f89b1865bd0c0cc775c08cd40c04
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The templating transforms references into their base types. Passing
those through involves copying, and refcount ping-pong for
QQmlRefPointers. Use forwarding references and std::forward to avoid
this.
Change-Id: I2524b53b9e06fadcc67a78c6ebf04f5bc2da354b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of applying a heuristic on when to call drain() in unrelated
code, we check the stack limit on each push(). If the soft limit is
reached we try to drain. As drain() itself can push again, we try to
limit the stack size by allowing at most 65 recursions of drain(). If
none of that helps, we crash with a meaningful error message.
This allows us to remove all the hacky drain() calls in other parts of
the code.
Change-Id: Ib979339470da0e85981de8131e7997755b757c71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/particles/qquickitemparticle.cpp
src/qmlmodels/qqmladaptormodel.cpp
tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp
Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MemoryManager::collectFromJSStack did push to the mark stack without
checking if there is actually still space available. To fix this, we now
drain the stack once we hit the limit.
The test case is a slightly modified version compared to the reported
one, removing one loop. This was required as our regular expression does
not throw an exception when there are too many capture groups. However,
to trigger the bug, looping was not actually necessary.
Change-Id: I4d00865f25a989c380f4f5b221f4068c80b71d2b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
|
|
| |
Fixes the QTextStream usages.
Change-Id: I0c009a82fb644a9f3c3d42ec410d18b680977f23
(cherry picked from commit 1c5c5f7aadc2dcc73a21eeb818e95c4e1b7de70f)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Provide different export macros and different top level headers for
each, don't include runtime headers from compiler sources.
Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Reduce memory allocation on platforms without virtual memory
Change-Id: I54114a9fde008ecb67a5cbf0da33962b0d933017
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QMLEngine by default allocates 4 MB for javascript stack and garbage
collection stack takes 2 MB. It is a lot of memory for platforms without
virtual memory.
Change-Id: I1575dd9584898dca33df66704f716c7b5a7c01c1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Plain load() / store() have been deprecated, so port away
to their straight replacements.
Task-number: QTBUG-76611
Change-Id: I79935b889cf7b2ba7698f70cc5e33994b034aa09
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
|
|
|
|
|
|
|
| |
Move the relevant files into more fitting locations and build the
devtools from only parser, compiler and qmldirparser.
Change-Id: Ibf37a1187f36d02983f9f43c6622acb243785b7b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
We don't need it and we don't need to check for V4_BOOTSTRAP in there.
Shuffle some includes around to provide everything we do need.
Change-Id: I3e75f1c6f9dc518006aabc9dcee21e5153899ac5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I9ba374f0c652628b7c84c36893c32b22529e384f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
| |
It failed to consider the IC allocator when calculating various sizes.
Task-number: QTBUG-74190
Change-Id: Id34c31d639896eed8422790b4adc56c989402807
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The failing assert is in qv4mm.cpp:170, which is correct. The failure
stemms from the fact that on 32bit platforms, quint64 does not have the
same size as quintptr. Who would have thought?
Fixes: QTBUG-73821
Change-Id: I9abe6bc9e2bfcdb6700ab7997c078076a9883cf2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to keep the weak values alive while the destruction callbacks
are running, so that they can still access them. We set them to
undefined later anyway because we expect the destruction callbacks to
mess with the values. Therefore there is no point in also setting them
in between.
Fixes: QTBUG-72137
Change-Id: I83f70230f5b4ad2761c74770f975b14a5ca71f18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When allocating a huge item that requires it's own memory
segment, we were actually not committing enough memory from
the OS.
Fixes: QTBUG-71501
Change-Id: Ic86a648bba4d7f1eeeded78d8de0f0fc1d3a251d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of Primitive and move the corresponding methods
directly into Value. Mark many methods in Value as
constexpr and turn Value into a POD type again.
Keep Primitive as a pure alias to Value for source
compatibility of other modules that might be using it.
Change-Id: Icb47458947dd3482c8852e95782123ea4346f5ec
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Icdd0f303f06605e8fdf2f1b324274ad95bfdebf3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I5cee2bf0c6a45ad2c14b52e1a4fc5ef015e01042
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Id23e80fe5918ba7dc897568123bf3db4d35e9092
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Instead of collecting the empty chunks after sweeping in a separate
vector, partition the chunks into non-empty and empty ones and erase the
second half after freeing them.
Change-Id: I7896c167b8b09a01b124dcdcb1eba8ddc0eef7f4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The destroy() method of internal classes tries to reference
it's parent class to unregister itself there. This could go
wrong if the parent class had been destroyed already and it's
associated memory been freed by the GC.
Fix this by only freeing actual memory at the end after the
sweeping has been done.
Change-Id: I85beb4792038d5a1a5708f5897af2c1950f8b8d1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Move both the code from qv4object and qv4managed into
a new qv4vtable_p.h file.
Change-Id: Ib1d58120b6c3b9b779b2692526c7e40a5265c4db
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
This makes it consistent with the memory profiler.
Change-Id: I628d03a4c0d079af0940f0e424b779d992b2919d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Accessing those is significantly slower than using a byte for each flag.
As they are performance critical, let's rather use some more bytes in
the vtable.
Change-Id: I7104d3b791f469fe5d6705f20db0c965878126e2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Otherwise this will show wrong stuff when running multiple engines
in different threads (and create noise in thread sanitizers)
Change-Id: Ia90054f5a54ee2c43870c8d839f25b195b09698c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This introduces a common base class for Strings and Symbols
giving us a unified approach to handling object properties for
both.
Change-Id: Ic9e5a18b084c8b730e134db990f101d47af224e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
These allocation functions only perform a single
allocation. Since all live objects have to be reachable
by the GC before calling into it, these scopes are not
required.
Change-Id: Ia7e89791d6ff2bfe87b7c5462191d28e04688df1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Turn it into a method instead of accessing the array directly
to simplify refactoring.
Change-Id: I197b56c8f58cfdfd294f429e6b15268c755f9837
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This is required to be able to turn the internal class into
something that lives on the GC heap.
Change-Id: Ie4318588d420743b1e1ab1cd596a1c9d153eb793
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Some compilers (in this case MingW 5.3) don't manage to properly
disambiguate the template overloads, and try to instantiate the
wrong template function.
Solve this by renaming the one of the template functions.
Change-Id: I3574e617fe96c4bd52920a0127a1dfe39cc3d302
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
The prototype argument has been unused for quite some time,
finally remove it.
Change-Id: Ifcebe413a1951ed972b370afc48640bd22969943
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
We can manage without calls to changeVTable() here, as the
set of classes allocated with this is rather limited.
Change-Id: I804e4850b91c61ebbca8a04edbe51deac911928d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Reduce code duplication by using variadic templates.
Change-Id: Ia12b67184f66190b433c99fb2157fca4e46cb2b6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| | |
Change-Id: I98ef98ca603a1d82f944973a06375e65192fdab2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The findclasslist.pl perl script that produces the linker version script
got confused by the "struct name" that was part of a macro and thought
that the class "name" in the *_p.h was supposed to be annotated with the
private API tag, resulting in a "*4name*" mask in the linker script,
which in turn made lots of public symbols "private" that had name in it,
such as QQmlProperty::name(). Fixing the indentation works around it and
conforms to coding style.
Change-Id: I0c66a6bb1d49941d6ec6dd89d9433d9b6ae0c639
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Task-number: QTBUG-67004
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|\|
| |
| |
| | |
Change-Id: I6b2568337c09ff98850b4ecccccc9a8fc25064cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We shouldn't allocate objects that are larger than the size of
a standard memory segment through the chunk allocator, as this
can lead to problems when freeing the segment and then re-using
it again.
Instead allocate a private MemorySegment for these objects, and
free it when the object gets garbage collected.
Task-number: QTBUG-66732
Change-Id: Ic24ff65d204977f313ab0adaf7a8132883e525f0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|