aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlpropertycachecreator_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QML: Make all fields in QQmlPropertyRawData privateErik Verbruggen2016-08-101-5/+5
| | | | | | | | And add accessors. This makes it easier later on to change the storage of the fields. Change-Id: I21163668ac83a7d52f398981baf3c27ef161c177 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix restoring of local aliases from disk cacheSimon Hausmann2016-08-061-0/+3
| | | | | | | | Local aliases are always "resolved". We must be careful not to access the same field in the union otherwise and mistake it as property index. Change-Id: I6369cdba145a62dcdaa10d8f4ee84bfa3cbfa0e3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Change the property data flags into a bit fieldErik Verbruggen2016-08-051-32/+25
| | | | | | | | | This will make it easier in follow-up patches to add or remove flags. It also shrinks the flags, because each type doesn't need its own bit (as those are mutually exclusive). Change-Id: I5ba6de5f330eb20c82aa16b4467ed6c952725979 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Introduce QQmlPropertyIndexErik Verbruggen2016-08-041-4/+3
| | | | | | | | This helps in making it clear when an index is a plain old number and when it consists of an encoded value type index. Change-Id: Ic50d95caf244ed0ee2d62bdba53910a371cfee04 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split out creation of alias properties in the property cachesSimon Hausmann2016-07-151-0/+234
| | | | | | | | | | | | Similar to the regular property cache creation code, this also has to become a template function so that it can be run on the compilation units loaded from disk in the future. What is shared between the code path of a fresh compilation vs. re-use of a unit from disk is the code to propagate the CompiledData::Alias entries into entries in the property cache. The code for iterating through the component spaces and resolving the alias references is not shared. Change-Id: I04c2a5575310400156b457ae7b709cffecb7455e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert QQmlPropertyCacheCreator to a templateSimon Hausmann2016-06-161-23/+29
| | | | | | | | This will allow the use of it also against a QV4::CompilationUnit and assorted data structures loaded from the disk. Change-Id: I4f337d1fcf319e80e422448671476db907de6d9e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QQmlPropertyCacheCreator implementation into the header fileSimon Hausmann2016-06-161-1/+411
| | | | | | | | | When the class becomes a template, it will have to live there anyway. By moving it separately now the diff of the template conversion becomes much easier to read. Change-Id: I0fbda26d908c928d96262bc55da20a36391a8092 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Separate non-generic code out of QQmlPropertyCacheCreatorSimon Hausmann2016-06-161-12/+18
| | | | | | | | | | Some code is not suitable for a future conversion of the class to a template, which is now moved out. This includes the tr() handling as well as the instantiation context, which does not require any parameterization. Change-Id: Ib40e24ebb7166c8649ca218f02558a737d39fe53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove base-class dependency of QQmlPropertyCacheCreatorSimon Hausmann2016-06-161-5/+6
| | | | | | | | By not depending on QQmlCompilePass the code will be re-usable also outside of the type compiler in the future. Change-Id: I55c637886cf557d6d130c4f9325d6b0790cb2806 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Minor QQmlPropertyCacheCreator API cleanupSimon Hausmann2016-06-161-4/+4
| | | | | | | | | | | | As part of removing the QQmlTypeCompiler dependency, the property cache vector output of the creator is now passed explicitly as an out parameter to the constructor. Similarly the error handling is made explicit in the API instead of implicitly passing any generated errors to the QQmlTypeCompiler. Change-Id: Ia3013011518f59f57f2eecb526f64dec7d82cb91 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Small data structure cleanupSimon Hausmann2016-06-161-1/+1
| | | | | | | | | Changed the QList<QmlIR::Object*> for IR object storage to use a QVector instead, to secure the guarantee of contiguous storage in memory. This will later be useful for direct indexing. Change-Id: I3c0a5f2c346627c8436971ec1d69160865eeb22e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up property cache creation codeSimon Hausmann2016-06-161-3/+13
| | | | | | | | | | | | | | | | | | * Reduce the complexity of the recursive tree traversal by moving the base type property cache creation into a helper function and using a context to encapsulate the origin of the current traversal * ensureVMEMetaObject() had only one call site and it's easiest to inline that for now. * Transition to a new state-less error handling, so that in the future this code can be used without the QQmlTypeCompiler dependency, which will be needed for loading of compilation units from disk. * A few missing consts. Change-Id: Ibe7209c357a3c7e101fac6960ece40a033e55f72 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* File naming cleanupSimon Hausmann2016-06-151-0/+79
Separate out the property cache creation code into a standalone file. Change-Id: Ib67bb1ef72c3de70ebd1ca8cae41947cbad7bfe3 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>