Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76025 Specify the QML language and write a QML-to-C++ compiler
  3. QTBUG-111490

qmlcachegen: Add optimization for coercing to static bool

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.9
    • QML: Compiler

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes