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.
Attachments
For Gerrit Dashboard: QTBUG-98305 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
381107,12 | QmlCompiler: Introduce compile passes | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
381230,10 | QmlCompiler: Phrase the shadow check as separate pass | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
381231,9 | Call the shadow check as separate pass | dev | qt/tqtc-qmlcompilerplus | Status: MERGED | +2 | 0 |
381441,2 | QmlCompiler: Introduce compile passes | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
381508,7 | Remove QQmlJSTypeResolver::Semantics | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
381509,8 | Move access semantics into ByteCodeTranslator | dev | qt/tqtc-qmlcompilerplus | Status: MERGED | +2 | 0 |
381581,19 | QmlCompiler: Move type generalization into separate compile pass | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
381601,23 | QmlCompiler: Add a code generator | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
382227,15 | QmlCompiler: Document the compile passes | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
382748,22 | Compile QML files ahead of time with qmlcachegen | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
383677,2 | Add option to generate only byte code | dev | qt/tqtc-qmlcompilerplus | Status: MERGED | +2 | 0 |