Details
-
Technical task
-
Resolution: Fixed
-
P1: Critical
-
None
-
many
Description
- Formulate the concept of compile passes
- Initial pass creates InstructionAnnotations
- Intermediate passes take InstructionAnnotations as input and output other InstructionAnnotations
- Final pass generates a QString from InstructionAnnotations
- Current QQmlJSTypePropagator is largely an initial pass.
- Shadow checking is moved into an intermediate pass that doesn't actually change the annotations but logs errors if shadowing is found.
- QQmlJSTypePropagator always uses specific types. Another intermediate pass wraps the specific types into generic ones where necessary. This way around it's much simpler than poking into the generic types to find out what specific type they're hiding.
- In direct mode we skip the generifying pass.
- In static mode we skip the shadowing errors pass.
- The final passes for direct and indirect mode shall be related by inheritance. All the visitor methods are already virtual. Refusing to re-use this infrastructure would make things unnecessarily complicated.