aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
Commit message (Collapse)AuthorAgeFilesLines
* V4: Move BitVector to the util header, so it can be re-used.v5.7.0-alpha1Erik Verbruggen2016-03-071-0/+117
| | | | | Change-Id: I994ff9277fbbcebf2e45b3146859eb75264b83f4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-2/+0
|\ | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * Remove unused static const non-constexpr variableThiago Macieira2016-02-221-2/+0
| | | | | | | | | | Change-Id: I0c94a5c2846b48c8aea7ffff14352f8a247c8cec Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-191-0/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Fix crash in Installer Framework when used with Qt 5.6Simon Hausmann2016-02-021-0/+2
| | | | | | | | | | | | | | | | | | IFW uses QQmlV4Function in a QJSEngine environment, so there is no QML context. Up to commit cc98678f404cd49750076795f39b31bfa36c80c3 that would work. Let's fall back to the root context as scope if we don't have a qml context. Change-Id: Ib240746a95a0d16d61620f97abc31e4c74f36723 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Enable V4 JIT for aarch64Laszlo Agocs2016-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | 64-bit ARM boards (f.ex. with Tegra X1) are becoming common and therefore enabling the JIT would be highly beneficial. Change-Id: I5ee46258151885194f93d2528edddd5f51dff964 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-293-5/+26
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Pass Qt.include() URLs through the URL interceptor if presentKevin Krammer2016-01-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | JavaScript files loaded by the Qt.include() function did not get passed through the QQmlEngine's URL interceptor, while those loaded by import statements did. Now both include variants have the resolved URL passed through the interceptor, e.g. an installed QQmlFileSelector Task-number: QTBUG-50483 Change-Id: Ife75e6b644687f3fb04048a311e570cdcbab8c6d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Make sure we destroy all QV4::QObjectWrapper objectsJian Liang2016-01-222-5/+24
| | | | | | | | | | | | | | | | | | | | Delay freeing QObjectWrapper Value to MemoryManager::sweep() to make sure we can destroy all QObjectWrapper objects. We also keep track of QObjectWrapper in QV4::Heap::ModelObject to make sure we destory them in QV4::MemoryManager::sweep() Change-Id: I3a8a3b07faab1f88c2eb746f68aa8d9584b40026 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4: Tweak "enable JIT" ifdefs.Erik Verbruggen2016-01-201-11/+16
| | | | | | | | | | | | | | | | | | | | | | - indentation, to make it readable - on arm64: only enable for Linux (but only after future testing!) - add CONFIG+=force-compile-jit handling so the JIT can be compiled/used even on platforms that don't officially support it (like iOS, where it works if you run from Xcode). This is done for debugging purposes. Change-Id: I8611ba409e10305f480463a16d88bc854b1c218a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1994-1316/+1880
| | | | | | | | | | | | | | | | | | | | | | 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>
* | V4: add Aarch64/ARM64 support.Erik Verbruggen2016-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | This uses the JavaScriptCore assembler rev. 195098. It is tested on iOS (for which it is disabled, as it only allows marking pages as executable when running from Xcode). Testing on Linux will be done when hardware arrives. Change-Id: I650e15fec03c27d4b326a2d70863a89b85cfc5c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Qml: fix expensive iteration over QHash::keys() and QMap::keys()Anton Kudryavtsev2016-01-181-3/+3
| | | | | | | | | | Change-Id: I7bb5dd3b49b9f3a638f81156a02d999dbbd932f3 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | WinRT: Enable JIT for x86/x64 target platformsMaurice Kalinowski2016-01-162-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only works for Windows 10 and later. Setting the "Code Generation" capability in the manifest, WinRT applications can use JIT for Windows 10 Desktop. Update the Allocator in regards to this and also update the VirtualProtectFromApp section. When the engine gets initialized, check for marking an area as executable. If it fails, fallback to interpreter mode. This does not affect ARM platforms, as we do not have calling conventions yet. It is implicitly disabled as V4_ENABLE_JIT is not defined. [ChangeLog][WinRT] Enable JIT for x86/x64 targets on Windows 10 and later. Change-Id: Ie05add5263f71387c5ce98456b9bec86c6c07ceb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | V4 JIT: Switch all platforms to W^X for the ExecutableAllocator.Erik Verbruggen2016-01-151-2/+0
| | | | | | | | | | | | | | | | This also fixes makeWritable, which needs to work in order to add more c0d3 to used pages. Also finish the WinRT parts. Change-Id: Idaa4187b1ec256e65c881285a608f3a51fdbeebd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Print warning if JIT is disabledMathias Hasselmann2016-01-141-2/+11
| | | | | | | | | | | | | | The wiki will provide information on how to work around the issue. Change-Id: I4409f5b4af0668ab28197adb8766898124e8cec8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-108-54/+33
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h tests/auto/quick/qquicklistview/tst_qquicklistview.cpp tests/auto/quick/qquicktextedit/qquicktextedit.pro tests/auto/quick/qquicktextinput/qquicktextinput.pro Change-Id: I95d2c20a8619e5b8fa361c941a16dd8dce3e04e7
| * Remove prohibited uses of underscore + capital letterThiago Macieira2016-01-084-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All identifiers starting with an underscore and a capital letter are reserved to the compiler and must never be used by the user code. Try to find a better name or, in the worst case, move the underscore to the last position in these identifiers. See commit cf63c63d558227fdbef09699c261560e7474f5ea in qtbase for a case of such an identifier causing a build breakage when the compiler began treating it specially (it was _Nullable). Change-Id: I1d0f78915b5942aab07cffff140f9f39c29f0fdf Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * Fix a couple of container detachmentsSérgio Martins2016-01-051-1/+1
| | | | | | | | | | Change-Id: I0def20d858de7721771702907b7a431b5fb90a1f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Fix crash in a non-debug build with assertions enabledThiago Macieira2015-12-291-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QV4::Heap::Base::setVtable has a Q_ASSERT on the state of Base::mm_data, but that member is never initialized anywhere (that is, the Base class does not properly protect its invariant). There were workarounds in some places for initializing the member, but only in debug mode. That was wrong for a number of reasons: 1) Q_ASSERT is still enabled if QT_FORCE_ASSERTS is defined 2) in release mode, the compiler will remove the double initialization anyway Another solution would be to give QV4::Heap::Base a constructor that initializes the member, but I am not sure whether adding a constructor to this class is permitted. Task-number: QTBUG-49681 Change-Id: Ic90fe6b1cbe84978a02fffff141beacbe73c0b9c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Revert "Fix QtSharedPointer::ExternalRefCountData object leaks"J-P Nurmi2015-12-233-13/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 839d2d3e2368bc8e107d22203b0611c852f54319, which has been causing crashes in qtquickcontrols2 auto tests and making it nearly impossible to integrate anything over the past few days. Change-Id: I570b286a067aae5e3c2d8c56ad601e1a6cb58c20 Task-number: QTBUG-50134 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make RuntimeHelpers::numberToString() comply with EcmaScriptUlf Hermann2016-01-051-2/+30
| | | | | | | | | | | | | | | | | | | | | | We could use DoubleToStringConverter::EcmaScriptConverter().ToShortest() here, but we'd have to #ifdef it for the case that we're using the libc double conversion. As the formatting does not produce a lot of code I decided against that. Task-number: QTBUG-50131 Change-Id: If7a2ef8063b57ab35cda4a60d8ddd65442d70103 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | tvOS supportMike Krus2016-01-012-2/+2
| | | | | | | | | | | | Change-Id: If48e8bcf55781d1148e15ce19e07cfbe35d829d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-183-0/+13
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I9588a3e2c7d590e031dd4c66905a79f0d74d3ac8
| * Fix QtSharedPointer::ExternalRefCountData object leaksJian Liang2015-12-183-0/+13
| | | | | | | | | | | | | | | | | | | | | | Call destroyObject() for every QV4::Heap::QObectWrapper object in heap in QV4::MemoryManager::sweep() to make sure the QPointer object contained in QV4::Heap::QObjectWrapper is properly destructed. We also keep track of QObjectWrapper in QV4::Heap::ModelObject to make sure we destory them in QV4::MemoryManager::sweep() Change-Id: I3b3e96cfc300c2e21ab691762879ac2970afa90c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove dead fwd-dclFrank Meerkoetter2015-12-152-3/+0
| | | | | | | | | | Change-Id: Ifd9fe32b80cd1ebc8dc9fda7c252ecdaae42cb37 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Replace all occurrences of qSNaN() with qQNaN()Ulf Hermann2015-12-076-49/+49
| | | | | | | | | | | | | | | | | | | | | | We generally don't want to produce signalling NaNs as those cannot be used in any further arithmetic operations. In particular -(qSNaN()) claims it's not a double. Task-number: QTBUG-49753 Change-Id: I23cec4fec2ddf08c02a7d53db7f3b9ba46b6c288 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-071-1/+2
|\| | | | | | | Change-Id: Ica75a71062d0613e415f2433c5c22c2e251b37cd
| * Fix crash related to BoundFunctionsFrank Meerkoetter2015-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix prevents the crash documented in QTBUG-49076. To quote Erik on the cause of the crash: Call stack is probably: FunctionPrototype::method_bind -> BoundFunction::create -> mm::allocObject -> BoundFunction::BoundFunction -> Heap::FunctionObject -> (Scoped)FunctionObject::init -> engine::newObject -> ... -> mm::allocObject The call to Heap::FunctionObject in BoundFunction is the call to the parent class constructor, which causes an allocation. But at that point, BoundFunction's target is still zero-initialised (the real initialization happens first thing *after* the parent class' constructor is called). Change-Id: If256f59168867cba9c886642ebaacb1d56801da4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use qtbase add/sub/mul with overflow implementations.Erik Verbruggen2015-11-271-63/+10
| | | | | | | | | | | | | | | | | | | | Those use compiler intrinsics when available. If not, the same code that was previously in qtdeclarative is used. Depends on 5ff7a3d96e0ce0dcb3d388b53d038cdd40c7a975 in qtbase. Change-Id: I8adf1a9d368ffc4e368260de518725ed7be6d2b8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | qv4identifier: Remove unused reserve() functionRobin Burchell2015-11-251-2/+0
| | | | | | | | | | Change-Id: I3b9bfc8586c660d5e09ae16a32774f520263b573 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove libdouble-conversionUlf Hermann2015-11-234-29/+37
| | | | | | | | | | | | | | | | We can use facilities in qtbase to convert doubles to strings now. This also makes the fix to QTBUG-47070 obsolete. Change-Id: I2f813164ff788b96281c3ffd37d8d2c65665de80 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-036-8/+40
|\| | | | | | | | | | | | | Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
| * Use the correct macro to detect 64-bit value encodingThiago Macieira2015-10-292-5/+5
| | | | | | | | | | | | | | We have a macro for it, so let's use it. Change-Id: I1d0f78915b5942aab07cffff140fa0ac23392362 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * Fix qmlcompiler build on win32.Erik Verbruggen2015-10-291-2/+2
| | | | | | | | | | Change-Id: Ie1239b6ba5f5ba77dd081ad6392d962822d124dc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QML: Fix typeof context property.Erik Verbruggen2015-10-273-0/+32
| | | | | | | | | | | | | | | | This was missing from f21e8c641af6b2d10f0d7e7e0fc6a755dab3673c. Task-number: QTBUG-48524 Change-Id: I5cc6a979d965a1ef6b7fbc916a7ca9df868b459a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QML: Sanitize reading environment variables.Friedemann Kleint2015-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Move V4 debugger and its test into better placesUlf Hermann2015-10-302-440/+4
| | | | | | | | | | | | | | | | | | Now that we have an abstract base class we don't need to carry the V4 debugger in QtQml anymore. The test clearly belongs into the debugger category. Change-Id: I0f71bdb331da8a568e43600363a0468299aa1a87 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into origin/devUlf Hermann2015-10-227-38/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debuggeragent.h src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h src/qml/debugger/qqmldebugserviceinterfaces.cpp src/qml/jsruntime/qv4debugging_p.h Change-Id: I82a4ce1bcd4579181df886558f55ad2b328d1682
| * JS: Math.random(): fix range to not include 1.0.Erik Verbruggen2015-10-201-2/+7
| | | | | | | | | | | | | | | | | | | | | | [15.8.2.14] specifies that the Math.random() returns a number greator or equal to 0, but less than 1. Libc however defines it to be less than or equal to 1, so we have to divide the returned value by RAND_MAX+1. Of course, in order to do this, we need to widen them to 64bits ints. Task-number: QTBUG-48753 Change-Id: Ia4d808014dbf2a5575f4226779214bf0d5981f49 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Properly resolve the context to create mutable bindings onLars Knoll2015-10-201-4/+13
| | | | | | | | | | | | | | | | | | This fixes a regression introduced in 5.5, where eval() calls in strict mode would still modify outer properties. Change-Id: I3ab70b45217eea16da68a4537e3c107b76794f2c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * Fix a crash when copying array dataLars Knoll2015-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Regression from 5.5. d()->arrayData->alloc can be larger, but never smaller than the allocation of the other's array data. Change-Id: I7d2265768f9d6e6298bfbba0d674a4d0e642422f Task-number: QTBUG-48727 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Nikita Krupenko <krnekit@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Only set V4 debugger when service is enabledUlf Hermann2015-10-151-1/+0
| | | | | | | | | | | | | | Otherwise different debug services could steal each other's debugers. Change-Id: Ic0a50333d21c7d20a7124240ea598f8446400ae3 Reviewed-by: hjk <hjk@theqtcompany.com>
| * QmlDebug: Split QV4::Debugging::Debuggerhjk2015-10-144-31/+44
| | | | | | | | | | | | | | | | | | | | ... into a pure interface and a QV4::Debugging::V4Debugger implementation. This is in preparation of a second implementation of this interface to be used with 'native mixed' debugging. Change-Id: I3078dcfe4bdee392a2d13ef43a55ca993e7b88d8 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Use QStringRef in a bunch of places.wip/dbusSérgio Martins2015-10-181-1/+1
| | | | | | | | | | | | | | Done automatically with clazy static analyzer. Change-Id: Ia0cf8fa24331ab102a3c3c30c2aa92ef1ba772e2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-1447-5/+510
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * Libraries: Fix single-character string literals.Friedemann Kleint2015-10-132-3/+4
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-0645-0/+495
| | | | | | | | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-022-2/+11
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| | * Fix compilation with ICC on WindowsThiago Macieira2015-09-022-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QV4::Managed is not copyable and its default constructor is deleted. However, it and classes derived from it are exported, which on Windows means the compiler will instantiate all possible functions and add to the DLL. ICC on Windows, unlike MSVC, attempts to instantiate the default constructor of the derived classes (like CallContext) and then the build fails due to the deleted Managed() constructor. Instead, use V4_MANAGED to mark each and every managed class as non- default-constructible and non-copyable. Only one note: the V4_MANAGED macro in QV4::Managed itself takes different parameters, so it needs to be slightly different. Task-number: QTBUG-48063 Change-Id: I42e7ef1a481840699a8dffff140007c65a7a35db Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>