aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8
Commit message (Collapse)AuthorAgeFilesLines
* Protect CompilationUnit member usage against word size differencesSimon Hausmann2017-03-171-1/+1
| | | | | | | | | Currently we only use the runtimeStrings offset in JIT generated code, so move that into a standard layout base class and use that instead. Task-number: QTBUG-58666 Change-Id: Id933ba5df3a6990e89886c2b328e9e814ec5e413 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port builtin methods in Canvas2D to new calling conventionLars Knoll2017-01-251-7/+0
| | | | | Change-Id: I0d141b3d655161a7892ffd0e5b8f019b3df51da9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert the last remaining builtin function to the new calling conventionLars Knoll2017-01-252-483/+500
| | | | | Change-Id: Iee18ce53111dcd080780e8125d9c65c960c9e604 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Convert more builtin functions to the new calling conventionLars Knoll2017-01-251-0/+8
| | | | | Change-Id: I053215261e1186aff25f29e0967219ef667f7678 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-143-47/+13
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Directly store the referenced QV4::Function pointer in the binding functionLars Knoll2016-12-092-22/+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>
| * Don't store a source location in the QQmlBindingFunction anymoreLars Knoll2016-12-092-11/+3
| | | | | | | | | | | | | | | | 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>
| * Start cleaning up the QmlContextWrapperLars Knoll2016-12-041-1/+0
| | | | | | | | | | | | | | | | | | The class should get merged with the QV4::QmlContext class. Simplify the cleanup by moving both classes into a common file. Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-293-12/+6
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| | * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-251-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| | | * Doc: fix incorrect argument name for createQmlObject()Mitch Curtis2016-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "string" is the argument type, not its name. Change-Id: Ia8f1afe01363eb6bfa69247aca5c0849c56000c4 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+1
|\| | | | | | | | | | | | | | | Change-Id: I905dcd29377bf1b2e0ee086823b54277d18e78dd
| * | | Cleanup of builtin JS helpers for qmljsSimon Hausmann2016-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the hand-written gc and print functions with the print and gc functions also used in Qml and QJSEngine. And while we're at it, this also adds the console object. Change-Id: Ia3a0ff24936b7ed5149cb689838b987f9178131e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Qml: mark some methods as constAnton Kudryavtsev2016-10-241-3/+3
|/ / / | | | | | | | | | | | | | | | | | | These methods do not modify objects. Change-Id: Iefe8effa97e6f6142308d61d57d08f9dc14a7709 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Turn the no-network support into a configurable featureLars Knoll2016-10-102-3/+5
| | | | | | | | | | | | | | | | | | Change-Id: Ic70f60c124fe166b37fbe9b853735be3c5e0d46d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Also check for correct destroy() chainingErik Verbruggen2016-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the destroy() method of Heap::Base was called when a Managed object needs destruction. This checks if a call to the parent's destroy() method was accidentally omitted. Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Make Heap::Object and all subclasses trivialErik Verbruggen2016-10-062-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC6 might dead-store-eliminate out our secret write to Base::mmdata, because it expects all memory content to be "undefined" before constructor calls. Clang might take the same approach if the constructor of Heap::Object is removed. By making these structs trivial, it also makes them memcpy-able. Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Make QV4::Heap::Pointer trivialErik Verbruggen2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | One more step needed to make QV4::Heap::structs trivial. Change-Id: I6bebfaff970518d65a09f2b9f50a6855c431d4c0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QML: Fix xmlhttprequestdata leakErik Verbruggen2016-09-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The creation and deletion condetion were different. We can unconditionally delete it, because the field is always initialized to nullptr. Change-Id: If7d4528d9cdf03d81d37b3b4d4bd24fcd0fca8ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into 5.8Liang Qi2016-08-162-6/+32
|\ \ \ | | | | | | | | | | | | Change-Id: Ib9f44a557bc1d9cf38058252efa0856c61f44c91
| * | | Qml: optimize string usageAnton Kudryavtsev2016-08-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringBuilder more. Use QString::asprintf instead of arg()'s chain. Use += operator to reserve extra capacity for possible free following append/prepend/+= call. Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Qt object: Add exit(int)Cavit Sina Dogru2016-08-092-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to the Qt.quit() function but also specifies the return code that the event loop will return. [ChangeLog][QtQml] Added exit(int retCode) method to the Qt global object. An application can call Qt.exit to specify a return code of the engine. Task-number: QTBUG-54360 Change-Id: Iaa319e6dc4d6b99dc3a5c01845e87b936fd2cab0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Added Logging Category support to QMLDominik Holland2016-08-101-3/+22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New Logging Categories can be defined by using the LoggingCategory type and define a name for the category When the id of a valid LoggingCategory is provided as the first argument to console.log and friends the LoggingCategory is used instead of the default "qml" LoggingCategory [ChangeLog][QML Elements] Added a LoggingCategory type and added support for it to the console object Change-Id: Ifaeed5f71de6ea6d8172d8c838d6e7789c4d6b9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Doc: QML Qt.callLater(): Fix documentation warningsTopi Reinio2016-06-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | qqmlbuiltinfunctions.cpp:2014: warning: Cannot find file to quote from: 'doc/src/snippets/qml/qtLater.qml' qqmlbuiltinfunctions.cpp:2001: warning: Can't link to 'QML:Qt::callLater()' Change-Id: I003494dba9aa6401825f8ec1b9adb6b99d7c45ff Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | V4: Pass scope around as parameters inside the runtime.Erik Verbruggen2016-06-222-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of many (or all) runtime functions consist of first creating a QV4::Scope, which saves and restores the JS stack pointer. It also prevents tail-calls because of that restoring behavior. In many cases it suffices to do that at the entry-point of the runtime. The return value of a JS function call is now also stored in the scope. Previously, all return values were stored in a ScopedValue, got loaded on return, and immediately stored in another ScopedValue in the caller. This resulted in a lot of stores, where now there is only one store needed, and no extra ScopedValue for every function. Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add \since 5.8 to Qt.callLater()Mitch Curtis2016-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | It wasn't added in 6cc908e25. Change-Id: I1a880984965b379494f153cbe21b1f7fdbc28a65 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-243-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| * | V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-203-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devSimon Hausmann2016-05-182-11/+85
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/v8/qqmlbuiltinfunctions_p.h tests/auto/qml/qqmlqt/tst_qqmlqt.cpp Change-Id: I9dd93732f4b19513576ca1dd89ae18c69de0203b
| * | QML: Fill QtObject lazily.Erik Verbruggen2016-05-112-11/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only iterate over the enumerations/enumerators in the staticQtMetaObject when a get() is done, and the key/value is not yet in stored in the underlying Object. The whole cost of the iteration is now moved to get() and advanceIterator(). The latter will add all items in one swoop, but iteration over QtObject isn't used much (if at all). The get() will add all key/value pairs up until it finds the requested key. Checking a number of applications shows that none of them use all (or the "last") key, so it will actually save entries (which equals memory) too. This change reduces the instruction count for QtObject from 2.7M instructions down to 95k. As this initialization is done from the QQmlEngine constructor, it also speeds up that initialization. Task-number: QTBUG-43770 Change-Id: I71331ff76bdacdd4790f7ff0430c4cbc214fe0ab Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-132-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * | Qml: use qDeleteAll moreAnton Kudryavtsev2016-04-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qDeleteAll uses iterator-based loop, that produce less code than index-based. Saves ~0.1 KB text size. Config: release build, Ubuntu 14.04 x64, gcc 4.9 Change-Id: Ib6c01f3b6a73367e33aecd34223edde15262d33c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickimagebase.cpp src/imports/layouts/plugin.cpp Change-Id: I5f48474df4034a1347ec74795c85d369a55b6b21
| | * V4: 'Cache' enumeration end instead of calling a method.Erik Verbruggen2016-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Saves ~2600 instructions on Linux/x86_64 for a normal instantiation of QV4::Heap::QtObject. Change-Id: I20c9311a96fd76911536153ddd1605500c6ac451 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Add Qt.callLater() function.Michael Brasser2016-03-085-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the new Qt.callLater() multiple times in quick succession with the same JS function as argument will result in a single call to that function, thus eliminating redundant unnecessary calls. Based on previous patches by Mathias Malmqvist <mathias.malmqvist@nokia.com> and Chris Adams <chris.adams@jollamobile.com> Change-Id: Ie71b60d4d48fa73d3deae723775cf36662d199ae Task-number: QTBUG-22400 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | QtLite: no_network option for QtDeclarativePaolo Angelelli2016-03-042-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | This patch adds the support for a no_network option for QtDeclarative, and the necessary #ifndef all around the code. no_network changes the interface of some classes, therefore using it breaks source compatibility. Change-Id: Iff612fb07041b8a7db99bd595bf038efaac2dd8a Reviewed-by: Risto Avila <risto.avila@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-198-112/+160
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove dead fwd-dclFrank Meerkoetter2015-12-152-2/+0
| | | | | | | | | | Change-Id: Ifd9fe32b80cd1ebc8dc9fda7c252ecdaae42cb37 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-211-2/+20
|\| | | | | | | Change-Id: I3567f741394f912d4312460e85555b6c39b61cb4
| * Document default argument behavior of Qt.createComponent()Mitch Curtis2015-11-161-2/+15
| | | | | | | | | | | | | | | | | | It's not currently clear how to get the default mode when also passing a parent, though lots of Qt code simply omits the argument. Change-Id: I35db7cf57991a2a3fafe4d00df2879b98037e93c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * Introduce a more sane "default constructor" for Qt.matrix4x4()Sean Harmer2015-11-111-0/+5
| | | | | | | | | | | | | | | | | | | | If no arguments are specified, create an identity matrix. This is by far the most common use case. This change avoids having to type in the 16 arguments of the identity matrix. Change-Id: I9e0d71897c5368d19ae87cff936df4b9e5e9b84a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Allow enabling of QML profiler in JS-only environmentUlf Hermann2015-11-181-8/+2
| | | | | | | | | | | | | | | | It's probably not so easy to use as you still need a QQmlDebugConnector, but it might work for some. Change-Id: Ibca42666a8ac0f81e2f30843f790ffd61b5ef65f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-031-1/+6
|\| | | | | | | | | | | | | Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
| * Load component synchronously in method_createQmlObjectUlf Hermann2015-11-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | setData() is not guaranteed to synchronously load the type. In fact, most of the time, it doesn't. However, by adding a private Synchronous mode to QQmlTypeLoader we can prefetch the type synchronously and then inject it into the component. Task-number: QTBUG-45418 Change-Id: I640f12ad20c01b778b5bc41f43574d8aea504195 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-143-27/+45
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-2/+2
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Add extension API to QJSEngineMitch Curtis2015-09-253-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users in a JavaScript-only environment to install extensions including: - Translation functions (qsTr(), etc.) - The console object (console.log(), print(), etc.) - Garbage collection functions (gc()) This deprecates installTranslatorFunctions(). This API results in less clutter in the API, as we'd otherwise need to have several functions for each type of extension. [ChangeLog][QJSEngine] Introduced an extension API that allows installing various function and object extensions (qsTr(), console.log(), etc.) to QJSEngine. [ChangeLog][QJSEngine] installTranslatorFunctions() was deprecated in favor of the new extension API (see installExtensions()). Change-Id: I4d6eb2097c3eda6810e967b2e8f6441c28c91a16 Task-number: QTBUG-40772 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-254-50/+50
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * Speed up QQmlEngine constructorLars Knoll2015-09-252-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freezing the global object using a script is pretty slow, esp. given that the script needs to be compiled as well. Rather do it programmatically. The old code actually had a bug that would only cause the global object to be frozen, not it's children. The new code fixes this, but doesn't completely freeze the objects. Instead it makes all the existing properties of the global object and it's children readonly, but still allows extending existing objects with new properties. Change-Id: I0d7331cdc89a0ac717b8ed3b1a490b2a3742de02 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>