Commit Graph

3 Commits

Author SHA1 Message Date
Ulf Hermann fac9448361 QmlCompiler: Improve register tracking
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>
2022-02-15 15:03:30 +01:00
Ulf Hermann 66a7ab6ac1 QmlCompiler: Document the compile passes
Task-number: QTBUG-98305
Change-Id: I910d48183c1d78edf6c9d5ca80ceca07d276c702
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-26 11:58:02 +01:00
Ulf Hermann cb3ec010ff QmlCompiler: Move type generalization into separate compile pass
We want to be able to skip it.

Task-number: QTBUG-98305
Change-Id: Ibb0293d348f2828a28be4c458cf955b4cc706caa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-26 11:57:52 +01:00