V4 IR: fix type inference.
authorErik Verbruggen <erik.verbruggen@me.com>
Tue, 1 Oct 2013 15:44:54 +0000 (17:44 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 2 Oct 2013 14:07:33 +0000 (16:07 +0200)
commit10278163081c25f1b3e659b6769f0635776ab89a
tree7661c2e70a980b722635605e23691dc6171f7e6a
parent4ea580a339af1949b6892689098e5cc2f4d108ca
V4 IR: fix type inference.

When a phi-node couldn't be fully typed (e.g., when one of the temps
was not yet typed), VarType was assumed. When a circular dependency
between two phi-nodes occurred, like with a condition inside a loop,
then depending on the ordering of the work-list, the two phi-nodes
could start oscillating between VarType and the correct type.

The fix is to check if one of the temps is not fully typed, and if so,
assume whatever we currently have as the result and have the statement
re-scheduled. Full typing will occur when the temp with the missing
type information is typed.

Change-Id: I950d81fe7fa8272cb37f7eea5b88092d1eb4817e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qv4ssa.cpp