aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/syntaxhighlighter/main.cpp
diff options
context:
space:
mode:
authorOlivier De Cannière <[email protected]>2025-04-07 16:55:28 +0200
committerUlf Hermann <[email protected]>2025-05-01 19:19:22 +0200
commitf4c2eeac6a01d2c9aea8f4281896e420399c19ae (patch)
tree80d9b8b9b92fc7233db64be698263d3d3ea85cc1 /tests/manual/syntaxhighlighter/main.cpp
parentac3a1c2cada5debed9d4d8c66ece934b7d3db65d (diff)
Compiler: Deduplicate conversion origins based on register's contentHEADdev
In the type propagator, when encountering back jumps, we need to run the pass again in order to ensure that the state of the registers at the target of the jump is fully known. For this, we need to compare the latest state in the current pass with states we have encountered earlier. If a match is found, no more passes are needed. The propagation is run multiple times and state is accumulated between passes. For certain conversions, this will try to append types as origins again every iteration. These would previously have been deduplicated by QQmlJSTypeResolver::merge but, since the change at 1e095058e165b1c2f244799ca1928ae4cc046a2c, we consider 2 registers to be equal only if their d pointers are equal. And since instructions such as MoveRegexp create a new register for the literal type RegExpr every time, the pointer doesn't match with the one from the register created by the instruction during the ealier pass. This would lead to set of origin types growing forever and to the state never matching a previous one. This, in turn, caused an infinite loop because an additional pass was always deemed necessary. Therefore, restore the old logic that deduplicates based on contained type, variant, and (recursively) scope. Amends 1e095058e165b1c2f244799ca1928ae4cc046a2c Fixes: QTBUG-135457 Pick-to: 6.9 Change-Id: I23167e95b958304698d12537598c1d72b03a5364 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
Diffstat (limited to 'tests/manual/syntaxhighlighter/main.cpp')
0 files changed, 0 insertions, 0 deletions