aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilerscanfunctions_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix leak of compiler contextsErik Verbruggen2018-04-101-3/+4
| | | | | | | | | | | | | | | Repeatedly entering a context that was entered before would result in leaking the previously entered context. This can happen when compiling child objects in a QML file, which is done recursively. So before compiling the bindings/function in the child object, first the global context and then the QML context are entered. The fix is to re-use the global context, as it's the same anyway for all objects in the same module. And we can remove entering the QML context, because nothing is in there, and we don't put anything in it ever. Change-Id: Ib1c4259d2dec22df46e96edb65bc3d377e52e671 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Arguments passed to functions should shadow the function nameLars Knoll2018-01-121-1/+1
| | | | | | Task-number: QTBUG-65140 Change-Id: I6c6b24f081b31ef0f16fec9b2024485acec11c2d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of the hack for named expressionsLars Knoll2017-09-021-4/+4
| | | | | | | | Instead simply use the pointer to the FunctionObject we have in the CallData now. Change-Id: I6d7ed8af22e89e0217bef427110611b661ac7965 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Limit the amount of escaping variablesLars Knoll2017-07-041-0/+1
| | | | | | | | | | Calculate more exactly which variables can be referenced from an inner context, and convert all the non escaping ones to temporaries on the stack. Change-Id: I0e33e85b0f6f426ef2812b8ecccee1870492b7b5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Properly calculate escaping variablesLars Knoll2017-07-041-0/+1
| | | | | Change-Id: Ia9f0b6d3f31bd3a7bd4316ee3f3e9ff977f973b7 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Move Codegen::ScanFunctions into it's own fileLars Knoll2017-07-031-0/+158
Change-Id: I2c6c2fa09bc58a26a350011f5d525ec9f4b89d7f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>