aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix whitespaceOswald Buddenhagen2014-01-22101-710/+710
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further pack messages for QQmlProfilerServiceUlf Hermann2014-01-2212-173/+172
| | | | | | | | | | | Allow multiple detailTypes in each packet and extend the profiling code to make use of that. Note that this changes the usual order of pixmapSizeKnown and PixmapLoadingFinished events. As far as I can see this doesn't affect the QML profiler frontend and the order of these events isn't specified anywhere. Change-Id: Id39ad98594ccf35add4415e08daf9e92ab561237 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Put calls to QQmlVmeProfiler behind "if (enabled)" macrosUlf Hermann2014-01-222-32/+38
| | | | | | | | | | The construction of arguments to those calls may be expensive and should be avoided if we're not really profiling. Task-number: QTBUG-35315 Change-Id: I558fa4cae6cf532d22193283f1ee2a3b680e2eee Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Put multiple QML profiling messages into one object where possibleUlf Hermann2014-01-223-241/+249
| | | | | | | | | | | | | | | | | | As most of the QML profiling messages only use a small subset of the available fields in QQmlProfilerData we can a, reduce the size of QQmlProfilerData by using unions b, put multiple messages into one object where their data doesn't overlap Furthermore we can add another field for saving QUrl members in QQmlProfilerData so that we can combine more different messages and don't have to convert from QUrl to QString while profiling. This should reduce the impact of the profiling code on the performance of the application being profiled. Task-number: QTBUG-35315 Change-Id: Iecd61e90cc8490d2efbbb381391d98dfee61d3cd Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Unify calls to profiler service event methods.Ulf Hermann2014-01-2212-394/+238
| | | | | | | | | | | | Don't needlessly duplicate information about the profiler being available and allow inlining. Use macros to check availability of the profiler in calling code and generally simplify the code. Task-number: QTBUG-35315 Change-Id: I0a9daec4a95f74b9db795ef2918a01fb772ea107 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Split ManagedVTable into two classesLars Knoll2014-01-2169-537/+397
| | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Adjust method naming to be closer to ManagedLars Knoll2014-01-213-21/+37
| | | | | | | | Also make markObjects() virtual, to be in line with Managed. Change-Id: I3e7682216660e2027c02c9181e541b12310902f3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Reorder members in ManagedVTableLars Knoll2014-01-214-26/+26
| | | | | | | | This is to prepare splitting it up into a several type dependent vtables. Change-Id: I5de8234e40ffc73fab47d43f4a1b30d244fc6ad9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use lookups for indexed accessesLars Knoll2014-01-208-1/+104
| | | | | | | This speeds up reading array data from objects significantly. Change-Id: I5d17a7b3e7583a16dc76d1ee6cbc1d7134e4c2fa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a SimpleArrayData classLars Knoll2014-01-2014-259/+266
| | | | | | | | | | | | | | | | This makes the ArrayData class 'pure virtual'. SimpleArrayData now contains the implementation of simple arrays. This makes the separation between simple and sparse arrays a lot cleaner. It also allows us to move len and offset from the base class into the SimpleArrayClass. This fixes some bugs where we accessed len for sparse arrays leading to some buggy behavior. Added a virtual length() method to ArrayData to query the highes used index in the Array. Change-Id: Iab2ba2a48ebe5b7031759eeb4ebe02b4d86233f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Save memory on array dataLars Knoll2014-01-2013-226/+340
| | | | | | | | | | | | | | | | | | | | | Store a simple vector of Values in the array data, instead of a Vector of Property's. This halfes the memory consumption on 64bit and simplifies our code. If an indexed property gets converted to an accessor property, we simply convert the ArrayData into a SparseArrayData. Add support in SparseArrayData to allocate double slots (two Value's) to hold a full Property in case someone sets an accessor on an indexed property. Some methods still return a Property*, but this is safe, as only the first Value in the Property pointer will ever get accessed if the Property doesn't contain an accessor. Change-Id: Ic9b0f309b09a2772a328d947a10faaf3be9fe56f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Changes to the structure of PropertyLars Knoll2014-01-203-36/+35
| | | | | | | | | | Put the getter into the regular value, and the setter into the next value following. Like this we can compress property data to only use 8 bytes per property for regular properties and simply allocate two slots for accessor properties. Change-Id: I330b95dbd583ebc2658fed79d37ac3b53492c0cd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixes to sparse array handlingLars Knoll2014-01-202-41/+43
| | | | | | | | | | deleting entries in sparse arrays could lead to rather unexpected results where values got moved to wrong indices, as we didn't correctly update the size_left values in the red-black tree. Change-Id: If71fcc04d39f257194394cb4f734d0db14b92b69 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Small bug fixLars Knoll2014-01-201-1/+1
| | | | | Change-Id: I5c670d898cd7a049de6f8a78d966df1c6fbde2c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix a small bug in queryIndexed() for StringObjectsLars Knoll2014-01-201-3/+3
| | | | | | | | | The string is immutable, thus queries indexing into the string data need to return Attr_NotWritable|Attr_NotConfigurable (see 15.5.5.2 of the ecma spec). Change-Id: I180d983b04a209c29fcd37b11682999b57bc42fe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't return a Property pointer in Object::advanceIteratorLars Knoll2014-01-2015-79/+76
| | | | | Change-Id: Iac4cb2a2252b18e40455910e51e3e374df7c1e80 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove Property * return value from ObjectIteratorLars Knoll2014-01-205-34/+37
| | | | | | | | The added side effect is that the QJSValueIterator is now somewhat faster. Change-Id: I01ba9f2a72a34224f5691130df69a91ab75b72e6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* clean up Object::has(Own)PropertyLars Knoll2014-01-206-27/+44
| | | | | | | | | | hasProperty is now implemented by calling hasOwnProperty on the proto chain. In addition, it should be slightly faster and doesn't use API that returns a Property pointer anymore. Change-Id: I6312d83ccfed3f0a1a8ec4c72c436a426d6eab44 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Lookup::lookup should not return a Property pointerLars Knoll2014-01-203-17/+49
| | | | | Change-Id: I5c9858f636c199b9cbe7cb2bffa03db14b6e1ae4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* [new compiler] Correct the use of default propertySimon Hausmann2014-01-203-16/+5
| | | | | | | | When a type declares a new default property, then the old default property continues to apply to its own bindings. Change-Id: Iafeec772baa4e1a430b09eed0b348b83984246cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix implicit component determination for composite typesSimon Hausmann2014-01-201-3/+1
| | | | | | | | | | | | We want to search every object for properties that implicitly define components, unless the object itself is a Component. That means if there's a QQmlType and that meta-object is QQmlComponent's or there's no QQmlType because it's a composite type. Fixes QtQuickControls parsing. Change-Id: I3fc7c2aff0c83ceada0c6772a02eff40a22777c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix duplicate property/signal name detection for group objectsSimon Hausmann2014-01-202-11/+9
| | | | | | | | | | | | | | | For a rectangle like this: color: "blue" border.color: "red" we must not issue a duplicate property error for "color" because they are in different objects. This patch fixes that by moving the sets for checking the presence of these into the object itself, so that the qSwap on _object also transitions to the correct property/signal name set. Change-Id: I9ac0e5877eb9f60b618b031f99290707de28112d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Add support for QML list modelsSimon Hausmann2014-01-2011-50/+252
| | | | | | | | | | | | | List model definitions make heavy use of custom parsers, which requires AST access as well as a general port to the new QQmlCustomParser API. Additional fixes in the custom parser support were needed to pass all tests: * Fix support for AcceptsSignalHandlers and AcceptsAttachedProperties * Don't call setCustomData unless the compiler generated data earlier Change-Id: Ic42f8a890391267c94f63d35f055b60fdbf3c83d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix type versioningSimon Hausmann2014-01-201-0/+14
| | | | | | | | | | Imported types with a meta object that contains revisioned attributes, need their property cache created for exactly the imported version. So this is done ahead of type and populated in the resolved types, similar to the old code path in qqmlcompiler.cpp. Change-Id: I65a5d140d8f49cceeeee1162ab2d6376ad9c2e42 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix refcounting leaks with property cachesSimon Hausmann2014-01-207-57/+72
| | | | | | | | | | | The TypeReference is not copy-safe, as it holds refcounted property cache pointers. For the new compiler code path, don't copy them but keep pointers to TypeReference objects around. Also make sure to ref the root property cache correctly and avoid the unnecessary addref for the property cache when creating new vme meta objects (initial refcount is 1). Change-Id: I0c4b952c8300c2167d926d9c35b8579fd505d596 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix customer parser use with nested objectsSimon Hausmann2014-01-202-17/+18
| | | | | | | | Types with a custom parser attached don't need to continue with validation of properties in sub-objects. Change-Id: Ib25f8e037cf651dfb30dd4016f89980612dff4f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix id mapping in implicitly defined componentsSimon Hausmann2014-01-201-1/+2
| | | | | | | | When scanning for component roots of explicitly defined components, make sure to skip synthetized ones. Now samegame runs :) Change-Id: If64171aefc1105a130a1a50e855af87977d2f3af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-01-184-12/+59
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-174-12/+59
| |\ | | | | | | | | | Change-Id: Id265682aa7db9be1c0b305ab3207b2c932a25a9f
| | * V4: fix range splitting when split is between intervals.Erik Verbruggen2014-01-174-12/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added some "white-box" unit tests and sprinkled in a bit of documentation. The case that went wrong is covered by the test rangeSplitting_1: before the fix, the new interval would have two ranges: [66-64],[70-71]. The first range is invalid and should not be there at all. Change-Id: If0742f4e6a96d98ea5d696f95126886ba66f92bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Now android has only one platform plugin.BogDan Vatra2014-01-171-2/+0
|/ / | | | | | | | | Change-Id: Idd3e0ede63be101a757a4f5f531693e3c7a24af6 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Make sure QQmlVmeProfiler methods can be inlinedUlf Hermann2014-01-172-121/+121
| | | | | | | | | | | | | | | | Move the definitions to the header and adapt the documentation. Task-number: QTBUG-35315 Change-Id: I511a192cfe1e3e09ade035175cb8f3f332022143 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Switch QML profiler off when deleting QQmlProfilerServiceUlf Hermann2014-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | Like this we don't have to check for QQmlProfilerService::instance anymore in order to find out if we can use the profiler service. If instance == 0 then enabled == false. Furthermore if it was thread safe before it must still be thread safe like this. Task-number: QTBUG-35315 Change-Id: Ie5737e3586f2431afbf11423ba53fd13dd371feb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | [new compiler] Add support for type and enum resolution for custom parsersSimon Hausmann2014-01-176-35/+89
| | | | | | | | | | | | | | | | | | This is in preparation for listmodel support, share the code for resolving types and enums between the old and the new compiler, as all it needs is the imports. Change-Id: I4908d71eee50c769108e0e2b68b03496722fa49d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Fix error reporting location for custom parsersSimon Hausmann2014-01-172-16/+6
| | | | | | | | | | | | | | | | | | | | After the binding of QQmlCompilePass to QQmlTypeCompiler, I forgot to change the customer parser handling to also report the errors correctly back to the QQmlTypeCompiler. Instead they were collected locally with an empty url. Change-Id: I5ee527a77e27c0339c507f326a3b0f0837353db3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Fix implicit component definition for default propertiesSimon Hausmann2014-01-171-2/+14
| | | | | | | | | | | | | | | | | | When trying to determine if an object binding should be a component or not and we don't have a property name for the binding, then we must check if the default property happens to be a QQmlComponent. Change-Id: Ie21fc438b8b2d86caa3991794e6eac688c074440 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Add support for value interceptors / on-assignmentsSimon Hausmann2014-01-176-34/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavior on x { NumberAnimation { ... } } is implemented by assigning a value interceptor (Behavior is a sub-class of that) to the x property in a special way. That requires various things: * A VME meta-object must be created and installed on the surrounding object, in order for the interceptors to work * On assignments need to be excluded from duplicate property assignment checks * Behaviours require also finalization callbacks on component creation Change-Id: I40250b71081a2e315cda3bdb6677fa4b227fa443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Clean up property cache / meta object builderSimon Hausmann2014-01-174-54/+86
| | | | | | | | | | | | | | | | Move the outter loop into the builder class itself, use a vector instead of a list (we know that it's a fixed size and we only do indexed access) Change-Id: I933f0496ea47b3bc7c2bebde7f1a14b4f603b4c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Initial support for QQuick state changesSimon Hausmann2014-01-175-1/+79
| | | | | | | | | | | | | | This requires the use of the customer parser together with lazy binding compilation Change-Id: I45d8a206267d3e0c807771a79645168254be9c95 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Preliminary support for script string propertiesSimon Hausmann2014-01-175-1/+75
| | | | | | | | | | | | | | These should later get resolved at compile time, like enum assignments. Change-Id: I2f40c8d13330d2a101f79af12fe708f466eef225 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [new compiler] Fix group property initializersSimon Hausmann2014-01-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bindings with an object initializer without a type name must be group properties, instead of regular object bindings. Fixes font { pixelSize: 24 } versus font.pixelSize: 24 Change-Id: I468caa48be13f91f88545ef001ac9aaa46ba5d14 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-1718-185/+327
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/dialogs/DefaultFileDialog.qml src/imports/widgets/qquickqfiledialog.cpp Change-Id: I00de6dd05cb773f01254061d585a82c90b229acd
| * Merge remote-tracking branch 'origin/release' into stableSimon Hausmann2014-01-169-134/+222
| |\ | | | | | | | | | Change-Id: Id18709cb0a4d85ffdadffa28aef98323367292d4
| | * V4: relieve more memory allocator pressure.Erik Verbruggen2014-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For _ZN13BenchmarkDemo11initPhysicsEv from the Octane testsuite, the total allocated memory drops from 1.5GB to 51MB. Peak memory usage stays at 29MB. Again, slow implementations of malloc()/free() will see a performance improvement. Change-Id: I21bc2f0d3735de0980fc9b3745906016e2e48a61 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Fix usage of FileDialog.folder property in QtQuickTobias Koenig2014-01-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content of the FileDialog.folder property has not been applied to the native QFileDialog, so it was not possible to pre-select a folder for the file dialog. Change-Id: Iaadd6aa71bc37739c16a2e7c5bff2d0050f15f3a Task-number: QTBUG-35973 Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| | * QtQuick.Dialogs FileDialog: don't go astray into qrc:/ on AndroidShawn Rutledge2014-01-161-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | Was due to string->URL conversion when setting FolderListModel.folder. Task-number: QTBUG-36006 Change-Id: Ia768d8a5473b3d4c22ef9be7c8b3cf28d3956f6f Reviewed-by: Liang Qi <liang.qi@digia.com>
| | * Fix failing context->next != 0x1 assertionSimon Hausmann2014-01-163-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit bf173fe5da381c88343296ca33ef6b06389c6d20 context objects are always on the GC heap and no more in that special linked list or stack allocated, so the next pointer became dangling/uninitialized and asserting on it was bound to fail randomly. Since we no more allocate contexts on the stack, we can safely remove the assertion. Task-number: QTBUG-35917 Change-Id: I104bd129c6c32f46a6302052f563abdf926cb879 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | * V4 IR: do edge splitting after SSA transformationErik Verbruggen2014-01-161-8/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the work for the dominator tree/frontier calculations, because there are less blocks to consider. All blocks inserted by splitting the critical edges, have (by definition) no effect on the dominator calculations. However, the immediate dominators for all new blocks needs to be added, because this information is used by the block scheduling. This change reduces memory/time usage during optimization passes, especially when processing excessively big switch statements. Change-Id: Ia69882e9dabdddffa1c98b1079012d8d988e1e8f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * V4: lower memory allocator pressure.Erik Verbruggen2014-01-163-77/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to datastructures and more re-using of locally used temporary vectors. For the test regress-74474-002.js this lowers the total allocated memory from 1.98GB to 158MB. Thse peak memory usage stays at 75MB. There is no functional change. This should give a modest performance improvement which mainly depends on the speed of malloc()/free(). Change-Id: I1877c1903e59a33ee79ff2b801ef6f2c1cee30a6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * V4 IR: update immediate dominators when purging unreachable basic-blocksErik Verbruggen2014-01-161-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The basic block scheduling uses this information to place loops. When the immediate dominator information is invalid, the scheduling can be sub-optimal, or will sometimes forget to schedule some blocks. Change-Id: Iaeb45f2b757b676310be25a658ceadc07d5722ec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>