Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.4.0 Beta1
-
5e4a1738b0 (qt/qtdeclarative/dev) 5e4a1738b0 (qt/tqtc-qtdeclarative/dev) cbfd4fdecb (qt/qtdeclarative/6.4) cbfd4fdecb (qt/tqtc-qtdeclarative/6.4)
Description
Consider:
import QML QtObject { function test() : int { var i = 0, x; while (i == 0) { x = 1; i = 1; } if (i == 1) return x; return 0 } }
This crashes the compiler because the register access on x in the "if" block is not correctly propagated. The type propagator still handles it via a second pass, but the basic blocks pass does not understand that x is indirectly propagated "backwards" through the "while". Turning off the life time analysis in QQmlJSBasicBlocks::adjustTypes() fixes the problem, but it's yet unclear at what cost.
Attachments
Issue Links
- blocks
-
QTBUG-104462 qmlsc miscompiles JavaScript functions with arguments
- Closed