Details
-
Technical task
-
Resolution: Unresolved
-
P3: Somewhat important
Description
If you coerce a value to bool, in many cases we can already determine the resulting value from the type alone, for example for null, undefined, or any value or sequence type. In those cases, we don't have to read the original value in the first place.
QQmlJSTypePropagator should check this, and then read the source register as some staticTrue or staticFalse type, the same way we read the Math object as void in generate_CallProperty(). Consequently, we'll have to handle staticTrue and staticFalse in all the places where we currently handle the bool type.