aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Optimize Arguments ObjectLars Knoll2016-12-133-3/+18
| | | | | | | | | | | | Avoid creation of the Array in most cases. Fix FunctionObject::method_apply so that it correctly recognizes this case and does the right thing. Add a getLength() method to ArgumentsObject to speed up the lookup of that property. Improves the RayTrace benchmark by around 15%. Change-Id: I53eb34a1f9515e59a191ee6f0eb23a3f4c6882d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Initialize idx in QV4::Lookup::indexedGetterFallback()Ulf Hermann2016-12-121-1/+1
| | | | | Change-Id: If7fe6635155937fa3e8c94ac081a267d96563859 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up the amount of init() methods on FunctionObjectLars Knoll2016-12-112-47/+7
| | | | | | | | Remove some unused ones and simplify the version taking a QString Change-Id: I682b4a06d4da84c2d6be7e4a9a3e831dbd11c9c4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of SimpleScriptFunctionLars Knoll2016-12-116-94/+31
| | | | | | | | | | Now that the code paths are very similar, we can simply to the check whether to do a fast or slow function call in ScriptFunction::call/contruct. To make this fast, cache the result of the required check in QV4::Function Change-Id: I03085ca2beb83b1721b60b0d7b2ab4c9266d1e48 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Some smaller optimizations for indexed property accessLars Knoll2016-12-102-23/+47
| | | | | | | Saves around 1% of instructions on crypto.js Change-Id: Iccef08b204e6e752d827242baf156efd9a4d58a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid one additional check when retrieving the Heap object from a ValueLars Knoll2016-12-101-7/+7
| | | | | Change-Id: Ief43d899e47cbfd865458a38aab8c466f6c2c76f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of QQmlJavaScriptExpression::setFunctionObject()Lars Knoll2016-12-093-14/+2
| | | | | | | | It was only used in one place now, and the code is actually cleaner when calling setupFunction() instead. Change-Id: Idfe2842b81e765569f2c70f3d5dcd1862442a2ee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix coding styleLars Knoll2016-12-091-10/+6
| | | | | Change-Id: I2d6d67273533930aaa9fc61c5f4cdbef2f0bcf53 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Pass a QV4::Function to the QQmlBoundSignalExpression constructorLars Knoll2016-12-093-6/+6
| | | | | | | And avoid the creation of a temporary FunctionObject Change-Id: Idaacfd978ac4ee26960bdf185272cc44d6618a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid passing a FunctionObject to QQmlBinding::create()Lars Knoll2016-12-096-22/+10
| | | | | | | | Like this we can remove the QQmlBinding::create() overload that takes a FunctionObject. Change-Id: Ib6c37395ded325e68cf0fbf3afd08fb6dd6efa3b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Directly store the referenced QV4::Function pointer in the binding functionLars Knoll2016-12-093-26/+3
| | | | | | | | | There's no need to store a pointer to the original function here, we can simplify the code when storing the pointer to the QV4::Function directly. Change-Id: I377aaecf56a0118606713c26cc7da4da001766b1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix the init() function in Heap::FunctionObjectLars Knoll2016-12-091-1/+2
| | | | | | | | | | One of the overloads took a QV4::Function * and was so far apparently unused (as it couldn't have worked since change 3b14e2ffdd8eb4b7f7f4508768b75f2acc399370). Fix it since it's getting some use again in the next change. Change-Id: I3eabb332f9e3f2262a5710d43016346b7138f7e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't store a source location in the QQmlBindingFunction anymoreLars Knoll2016-12-096-19/+5
| | | | | | | | It's not needed anymore as we now store this in the binding directly. Change-Id: I518c83207f219b690f31200e4d17251075bbd322 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a setSourceLocation() methodLars Knoll2016-12-092-1/+9
| | | | | Change-Id: I611ab4fe5dd59cb8e07b0fa69ce22c7df5a6c3f2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of FunctionObject::createQmlFunctionLars Knoll2016-12-096-33/+20
| | | | | | | | Instead, simply create a QmlContext, and setup the bindings with the QV4::Function itself. Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't create a FunctionObject in createQmlBinding()Lars Knoll2016-12-093-53/+2
| | | | | | | | This also removes the last use of the QmlBindingWrapper, so remove that class as well. Change-Id: I2ec795b6ab695a689fb24d64c9b8809b651c2b37 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid the creation of a FunctionObject for most bindingsLars Knoll2016-12-095-3/+30
| | | | | Change-Id: Ia62d380945250015009d9c2b6ed65f6d830277ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't store a FunctionObject in QQmlJavaScriptExpression anymoreLars Knoll2016-12-092-18/+29
| | | | | | | Instead store the QmlContext, the QV4::Function and a source location. Change-Id: Iafa54c09b9be7e78bace3498673ca94a2a145c97 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Limit access to m_function to QQmlJavaScriptExpressionLars Knoll2016-12-095-10/+28
| | | | | Change-Id: I070f73f106440667fce2c7fe33310369a6aa1376 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't create a QML function is the signal parameters are invalidLars Knoll2016-12-092-4/+4
| | | | | | | Moves the error checking to where the error occurs. Change-Id: I2590d3a9d41f41c16d19e4f5883b78a8b28a883c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove some dead codeLars Knoll2016-12-091-4/+0
| | | | | Change-Id: Ibf6d50926edd85ebee545bcfdfcd14cb0eeab969 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid using the FunctionObject in QQmlJavaScriptExpression::evaluate()Lars Knoll2016-12-091-3/+10
| | | | | | | Rather directly execute the call on the QV4::Function. Change-Id: I1de52075760be6b3a0358af83270ebd4e1d1e8ae Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Change signature of QQmlBinding::create to take a FunctionObject *Lars Knoll2016-12-095-6/+6
| | | | | | | This is what's in the Value in all cases anyway. Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Mostly use the QV4::Function in javascript expressionsLars Knoll2016-12-096-35/+30
| | | | | | | | | Move the function() accessor from QQmlBoundSIgnal to QQmlJavaScriptExpression. Change the profiler to operate on QV4::Function objects for binding profiling. Change-Id: Ic7ce83c487ceb69cad4b16e3dab42026238b7e82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml Inspector: Avoid taking a QPointer of an object being deletedUlf Hermann2016-12-092-4/+2
| | | | | | | | As we manually remove items to be deleted from the list of selected items, we don't need to keep them as QPointer in the first place. Change-Id: Ie416b47d4f193cb3dc7cfb07e66ab2b36ad6721c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Bump QML cache file versionSimon Hausmann2016-12-091-1/+1
| | | | | | | | After the recent data structure changes this seems appropriate to force a cache rebuild for those following the branch in release builds. Change-Id: Ie4c0534729a752137068b8f24beb9d15e7895c46 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unused argumentLars Knoll2016-12-092-8/+4
| | | | | Change-Id: Ie490f113b6fc48ea75eb5903a79dddb02faa7301 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid od ScriptFunction::init()Lars Knoll2016-12-092-7/+1
| | | | | | | It was just forwarding to the parent implementation anyway. Change-Id: I179966699978a86efdd6792b31b56eded501efbd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor the calling code for (Simple)ScriptFunctionLars Knoll2016-12-096-106/+93
| | | | | | | | | | | Factor the common code out into separate methods that can later on be reused by the QQmlJavaScriptExpression. Also ensure a CallContext is safe to use with a 0 FunctionObject. Change-Id: I1181a8e320b8c931d9df5b2c91bc143d8587fb60 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Minor cleanupLars Knoll2016-12-091-5/+6
| | | | | Change-Id: I091f2de77f84fb298404dc8784defcf3a812d56a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add sourceLocation() accessor to QQmlJavascriptExpressionLars Knoll2016-12-095-15/+9
| | | | | | | | And remove it from the derived QQmlBoundSignalExpression class. Change-Id: I93cdc67136ddd916474acd2169faf380e296a900 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move the check whether a function is simple to QV4::FunctionLars Knoll2016-12-092-6/+12
| | | | | | | This allows re-using the check in the QQmlJavascriptExpression code. Change-Id: I647a6edb4844911f540f08c4a067d055676dd0ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid some copies of Values on the JS stackLars Knoll2016-12-092-12/+10
| | | | | Change-Id: I1c7dca6e8d17da9f3d76b68d072370b087840f2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickSpriteEngine: Optimistic speedup for updateSpritesRobin Burchell2016-12-082-6/+7
| | | | | | | | | | | | Switch from QList to QVector, and avoid using pop_front -- remove all in one operation instead. The idea here was to provide some gain to sprite-sequence in qmlbench, but any possible gain is pretty miniscule due to the lack of batching that example suffers. Still, we end up with less CPU time taken, which is a win of sorts. Change-Id: Ib7c101afa71ee617c3c4506b14701d6a4143ed3a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickWindowPrivate::dragOverThreshold(): ignore zero velocity thresholdJan Arve Saether2016-12-072-11/+15
| | | | | | | | | | | | | | | Previously, this would trigger a drag even if the touch point was quite steady, since a rather steady finger could report a very small velocity (usually between 0 and 1). Change so that it will ignore velocity if it's not positive. At the same time convert it to a template function since we want to also use this for QQuickEventPoint later on. Change-Id: Ibb2210813707399ae84e3422718c995897891060 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.8.0' into 5.8Lars Knoll2016-12-0723-1241/+1337
|\ | | | | | | Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
| * Don't read members of the binding after it has been freedLars Knoll2016-12-061-2/+1
| | | | | | | | | | | | | | | | | | Fixes a use after free valgrind error (and thus a potential crash) in tst_qqmljavascript::selfDeletingBinding that got introduced with change e7f28bd13b18cfcb36ef41804029b9b296117002 Change-Id: Ia6b69af199c0f2af1cc0d33d4f13a8593b2c6d51 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * comment out all uses of QPointerUniqueId temporarilyShawn Rutledge2016-12-042-5/+6
| | | | | | | | | | | | | | | | | | The next step is to rename it, but we do this first to avoid breaking CI while it's renamed in qtbase. Task-number: QTBUG-54616 Change-Id: Iae3a098b9ab5571599af838d19b1869b84b2165f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Fix compilation error with ICC 17: it doesn't like auto and commaThiago Macieira2016-12-042-16/+48
| | | | | | | | | | | | | | | | | | | | | | | | The error is a warning upgraded via -Werror and the message doesn't even make sense to me: error #3373: nonstandard use of "auto" to both deduce the type from an initializer and to announce a trailing return type Intel-Issue-ID: 6000164202 Change-Id: I73fa1e59a4844c43a109fffd148caf09a1952e92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix build of QtQuick compiler generated code with popScope()Simon Hausmann2016-12-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | After commit 5e6bf607ee1e466eebabb7b8114c9f5e8fc40a9e we would not have an exception check template matching anymore that sets NeedsCheck to false, and consequently generated code that would try to call popScope() with an ExecutionEngine instead of a NoThrowEngine. Task-number: QTRD-2219 Change-Id: Iddf8218d1efb9af77c9a5f7ef84b9998fb167ef5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Fix support for namespaced types in property/signal declarationsSimon Hausmann2016-11-307-1156/+1192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declarations such as property Namespace.Item foo or property list<Namespace.Item> foo would get rejected by the grammar due to the lack of productions. This is now encapsulated in the UiPropertyType, which used to be merely an identifier but is now changed to produce a UiQualifiedId - the same type that's also used for MyNamespace.Item { ... } object declarations for example. Task-number: QTBUG-10822 Change-Id: Ic3ac1adbe17c83b24b67950c2f089e267b73b99b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Layouts: Use QQuickItemChangeListener for more thingsRobin Burchell2016-11-304-48/+51
| | | | | | | | | | | | | | | | | | | | | | | | Signal connections are expensive: even with qmlobject_connect, there's a bunch of memory allocation. By avoiding the signal connections, we can do the same thing essentially, a little faster. This gives me another 15-20 RowLayout instances per frame when testing with RowLayout containing 5 Rectangles on qmlbench (from ~139 to ~155 ops/frame). Change-Id: I4448a28128dc251e40b6b06d642bae716af212f4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * QQmlDelegateModel: Avoid allocating unnecessarilyRobin Burchell2016-11-302-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wait for the update request to be posted and take effect before piling another one up. This speeds up qmlbench creation benchmarks a bit (as they make use of Repeater). Results for benchmark/creation/delegates_item on a 5.6 base on a 2011 mbp: Before: Average: 670.4 ops/frame; using 5/5 samples; MedianAll=674; StdDev=6.34, CoV=0.00946 - StdDev (all samples included)=6.34 After: Average: 702 ops/frame; using 5/5 samples; MedianAll=700; StdDev=8.97, CoV=0.0128 - StdDev (all samples included)=8.97 Change-Id: Ic0ef4c1e2d6cb309edeb512cad4280a15abc7a06 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Make sure we cannot reload debug connectors on shutdownUlf Hermann2016-11-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The various Q_GLOBAL_STATICs involved in the loading of debug plugins may be destroyed in any order. If the connector is unloaded before the services, it might get reloaded when one service calls instance(), trying to deregister itself. Prevent this by clearing all the parameters. Change-Id: Iee4a05e09401be916f0339d72eb8b5f2c9eac55d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * qquickwidget.cpp: move QT_END_NAMESPACE to bottomFriedemann Kleint2016-11-301-3/+2
| | | | | | | | | | | | | | Amends change 62198ab4485e15f350122770d5dfd8de7e59b8f9. Change-Id: I14a18c938126d475f9cec0f940596558b01c33de Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix caching of the current qmlContext in QQmlObjectCreatorLars Knoll2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A context is not a QV4::Object, just a QV4::Managed. Testing for Object here lead to us creating a new QV4::QmlContext every time this method got called instead of sharing it. Reduces memory consumption and improves the performance of some of the creation benchmarks in qmlbench by ~20%. Change-Id: I20c0ad52133aa0cb40c9d2551fd635bef8b7d90a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge 5.8 into 5.8.0Oswald Buddenhagen2016-11-2947-1358/+1658
| |\ | | | | | | | | | Change-Id: I109ecd4511c5d6408e49b2f910c3f6253633ce4f
| * | Allow for the QML engine to run on "hardened" Linux systemsSimon Hausmann2016-11-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to WinRT let's test whether we can allocate executable memory before enabling the JIT. The caller code will fall back to the interpreter. Task-number: QTBUG-56758 Change-Id: I63d6830c6acc8cb316333162be212e1764483baa Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Change ExecutionContext::getFunctionObject() to getFunction()Lars Knoll2016-12-066-34/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | And return a QV4::Function from now on. This simplifies code in other places and provides all the info required for stack traces and debugging. Change-Id: I512a8ac3932268d8cfc60675e75c4661d1f16fd8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Use QV4::Function instead of the FunctionObject in CallContextLars Knoll2016-12-065-37/+53
| | | | | | | | | | | | | | | | | | | | | | | | The prepares for being able to call binding code without having to create a full FunctionObject. Change-Id: I5f0dcaa4d1ae8876554cac82597351801588bc02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>