Qt Declarative (Quick 2)
Go to file
Ulf Hermann a741271dd5 QmlCompiler: Resolve types for calls in init step
Now that resolving the types can be more expensive, especially for
composite types, we should be careful not to do it too often. Most of
the cases where we have to resolve types are for lookups. Most of the
lookups only resolve types in their "init" step, which ideally is only
performed once in the application life time.

However, so far calls had to pass the types of arguments and return
values in the actual "lookup" step, which causes the resolution to
happen on every call.

This change moves those type resolutions to the init step. We can do
this because:

1. Regular typed method calls are calls to a specific overload with
   specific types. The method itself already has the list of types and
   we can just remember which one that is. Then we don't need to pass
   the types.

2. Calls to shadowable methods are all-QVariant typed. The only thing
   we need to know is the number of arguments. Then we can construct
   the list of types in the lookup itself.

We can remember which one of those we're dealing with by adding further
"AsVariant" lookup functions. For the case of non-property-cached
regular methods we also need a new "Fallback" lookup like we already
have it for properties.

Change-Id: I74a3729131d6a5ea0ad79e276965a5167cd609be
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2024-10-14 17:10:45 +02:00
LICENSES Weather forecast example: Clean up assets and attribution 2024-02-06 13:44:41 +01:00
cmake Mark RegExpJitTables.h as non-module header 2023-04-03 15:38:57 +02:00
coin Change Axivion analysis result format 2024-06-28 13:40:35 +03:00
dist Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
examples Clean up CMake output from wearable example when building qtdeclarative 2024-10-10 14:45:21 +02:00
features
src QmlCompiler: Resolve types for calls in init step 2024-10-14 17:10:45 +02:00
tests QmlCompiler: Resolve types for calls in init step 2024-10-14 17:10:45 +02:00
tools qmlformat: Pass QQmlFormatOptions by const ref 2024-10-07 19:04:59 +02:00
.cmake.conf Port to std::(v)snprinf() and mark the module q(v)snprinf-free 2024-08-06 22:35:55 +00:00
.gitattributes qmlformat: improve testing of file based options 2021-11-04 13:35:48 +01:00
.gitignore gitignore: Add compile_commands.json and .ccache 2024-05-16 17:25:19 +02:00
.gitmodules
.tag Use tree hash rather than commit hash in .tag file 2022-01-25 23:55:27 +01:00
CMakeLists.txt Fix detection of CMake target ExamplesAssetDownloaderPrivate 2024-07-22 15:00:36 +02:00
README.md Rewrite README.md 2021-08-12 13:15:17 +00:00
configure.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2024-09-27 03:50:43 +00:00
licenseRule.json Add a licenseRule.json file for checking of SPDX license identifiers 2024-07-01 16:33:02 +02:00
qt_cmdline.cmake Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
qtdeclarative.doxy Add doxyfile for building doxygen documentation 2018-08-16 15:54:40 +00:00