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

Generate code for list operations when compiling to C++

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows
    • e84686415 (dev)

    Description

      Run the attached reproducer on Ubuntu, Qt 6.5.0, and QMLSC will complain about untyped JavaScript functions:
      Warning: main.qml:19:23: Could not compile function getText: Cannot generate efficient code for call to untyped JavaScript function [compiler]
      Warning: main.qml:36:77: Could not compile binding for onCompleted: Cannot generate efficient code for call to untyped JavaScript function [compiler]

      Clearly, QMLSC cannot convert shift() and indexOf() to efficient C++ codes.

      I guess this kind of QMLSC-related issue is a part of this massive task:
      https://bugreports.qt.io/browse/QTBUG-76025

      Attachments

        For Gerrit Dashboard: QTBUG-112722
        # Subject Branch Project Status CR V

        Activity

          People

            qtqmlteam Qt Qml Team User
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes