Some files in tqtc-qtdeclarative were missing the commercial
SPDX-License-Identifier. Build files, examples, tests, or
documentation are not updated.
Task-number: QTQAINFRA-5900
Change-Id: I2cad9a7a271b0b3f3af3074259614b890b266a91
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 132fe2df41)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of accepting the inconsistency between interpreter and compiled
code here, we can just detect whether a value can be affected by side
effects and refrain from reading it then. Since you can always
explicitly reload a value that may have been changed, the resulting
compile warnings are easily worked around in user code. Refactoring user
code this way also makes it much clearer what is actually going on.
Task-number: QTBUG-109221
Change-Id: Ica832e39838ef732b0d181364630737fd7709b74
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4634b6bf54)
Since lists are allowed as property types, you should be able to pass
them as arguments to methods, too. For now we only handle QML-defined
methods, implemented by adding JavaScript functions to your QML
elements. The usual type coercion rules apply if you pass JavaScript
arrays to such methods. That is, it usually works.
We now resolve properties with the "list" flag to their actual types
(QQmlListProperty or QList) already when populating the QQmlJSScope, and
store the list types as members of QQmlJSScope rather than as a special
map in QQmlJSTypeResolver. This allows us to do the same to lists passed
as arguments and simplifies some of the type analysis.
Fixes: QTBUG-107171
Change-Id: Idf71ccdc1d59f472c17084a36b5d7879c4d959c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
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>
This basic block analysis pass uses the tracked types to determine dead
stores. This is better than the one we already have in the code
generator because it also tracks dead stores through renames and it
allows removal of lookup results. Furthermore, it adjusts each store to
write the type most favorable to its readers. This avoids unnecessary
conversions at run time.
It cannot replace the other dead store elimination, yet, because it
doesn't see whether the results of rename operations are read after the
rename. This capability will be added in a separate change that also
tracks the register numbers. Once this is in place, we can delete the
other basic blocks pass.
Task-number: QTBUG-100157
Change-Id: I766c919412b6cf43befa7bdb1a6e5e11b41fe55b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way we can uniquely track the stored types throughout the
compilation.
Change-Id: Ibf3814a37f105c2eede2a08f547ab5fbfa1c16e2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We will need to iterate the annotations in program order. Therefore, we
need an order map. QFlatMap fits here.
Change-Id: I9a7fe68b0e5aa817257ceabb4853b1554d3ad709
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
You can only change one register per instruction, and it doesn't have to
be the accumulator. We don't have to store the full register set in
every instruction annotation. It's enough to store the changed register.
This simplifies the logic around choosing the in/out accumulator types.
Now you can rely on the "in" accumulator to always be in the register
set, and the "out" accumulator to be the changed register if applicable.
There will typically be less than 10 registers active at any given
instruction. Therefore, use QFlatMap to store them, rather than QHash.
Also, rename the storage for the type conversions so that we can
actually see what they are.
Change-Id: I694ac2bce7911a4c290c1dccef34d28cde50a1d3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We want to be able to skip it.
Task-number: QTBUG-98305
Change-Id: Ibb0293d348f2828a28be4c458cf955b4cc706caa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>