// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
\page qtqml-tool-qmlsc.html
\title QML Script Compiler
\brief A tool to compile functions and expressions in QML.
\keyword qmlsc

The QML Script Compiler, \c qmlsc will compile functions and expressions in QML
files of an application into C++ code within limitations set by the nature of
JavaScript. It replaces \e qmlcachegen, and simply generates C++ code in addition
to byte code for functions that can be exhaustively analyzed. The following flow
chart explains the compilation of \e qmlsc.

\image qmlsc-compilation-scheme.png

\section1 Limitations when compiling JavaScript

Many JavaScript constructs cannot be efficiently represented in C++. \e qmlsc
skips the C++ code generation for functions that contain such constructs and
only generates byte code to be interpreted. Although, most common QML expressions
are rather simple: value lookups on QObjects, arithmetics, simple if/else or loop
constructs. Those can easily be expressed in C++, and doing so makes your
application run faster.

\e qmlsc is available for commercial customers and some of its features are
merged into \e qmlcachegen, which continues to be available with all versions of
Qt.
*/
