QtQml: Calculate deferred and custom parser bindings at load time
Which bindings are deferred or handled by a custom parser depends on the
types we resolve at run time. Nevertheless we bake this information into
the compilation unit. This means we have to re-generate the compilation
unit whenever any of the types changes, and it means that qmlcachegen
can't produce it at all.
Introduce a separate block of "runtime data" that we calculate from the
compilation unit and the resolved types when loading it. It holds tables
parallel to the objects and bindings of the compilation unit. For now it
contains the deferred and custom parser classifications, which we
calculate in the same way as the type compiler did. Read them from the
runtime data rather than from the compilation unit.
When populating a grouped or attached object as part of a deferred
binding, the object creator applies the deferred bindings of that object
right away. It used to look at the flags of the binding to find out. At
that point, we don't know the index of the binding anymore. Record the
fact that a grouped or attached object is populated by a deferred
binding on the object itself.
Drop the deferred and custom parser binding scanner of the type compiler
as well as the respective flags of objects and bindings. Its error
reporting moves to the load time calculation.
Task-number: QTBUG-147816
Change-Id: I20ac95816db1a25d2bcf5f2087d76ec1badf7079
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>