aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: added requirement for importing JavaScript resourcesNico Vertriest2017-02-211-4/+4
| | | | | Change-Id: I4426eb90ad4d87d63e0f0353dfbea88298e263c9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickWindowPrivate::deliverWheelEvent: fix global position of the eventOleg Yadrov2017-02-171-1/+1
| | | | | | | | | | [ChangeLog][QtQuick] QWheelEvent in QQuickItem::wheelEvent now keeps correct global position. Task-number: QTBUG-58845 Change-Id: I7f88d5152927a157e2bd07ee4d5f2208be884eec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add missing qmlRegisterExtendedUncreatableType variantKevin Ottens2017-02-172-0/+41
| | | | | | | | | | | | | We need another qmlRegisterExtendedUncreatableType allowing to pass the metaObjectRevision as third parameter. Otherwise extended uncreatable types can't use for instance REVISION in their properties. This is missing for some of the Qt 3D types for which we are cleaning up the versioning for 5.9.0 and which fall in this category. Change-Id: I20ebec339814d7f43cc4b2b58090406b0d5fb97e Task-Id: QTBUG-58895 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix assert on QT_POINTER_SIZE != 8BogDan Vatra2017-02-151-1/+1
| | | | | Change-Id: I8fa64fc8d67b6093eb368866d17d967644514577 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Directly load already known metaproperties in QV4QObjectWrapperUlf Hermann2017-02-151-8/+18
| | | | | | | | | | | | | A method and a property can have the same name in a QObject. This is not directly expressible in a JS object, but when iterating the properties of a wrapped QObject we should not look them up by name as we might find the wrong one this way. However, as we already know what we are looking for, there is no need for any further searching anyway. Task-number: QTBUG-58887 Change-Id: I68574008c7a078baab9b343d550cc27956b0d5a9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix typo in documentationFrederik Schwarzer2017-02-151-1/+1
| | | | | Change-Id: I890fe5a7d2ec6268a9b85cf6060c794fbc239960 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add Q_ALLOCA_VAR, Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macrosKimmo Ollila2017-02-159-10/+54
| | | | | | | | | | | Define Q_ALLOCA_VAR macro to be used instead of #ifdeffing the occurrences of alloca() in case it's not supported. Q_ALLOCA_DECLARE and Q_ALLOCA_ASSIGN macros separate memory allocation from the declaration and RAII. Change-Id: Idc7551642c48a968a44bcade14d84800a3a1270e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtQml/qv4mm.cpp: Fix type of debug helper lastAllocRequestedSlotsFriedemann Kleint2017-02-151-1/+1
| | | | | | | | | | Fix MSVC 64 developer build: memory\qv4mm.cpp(653): error C2220: warning treated as error - no 'object' file generated memory\qv4mm.cpp(653): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data memory\qv4mm.cpp(689): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data Change-Id: Ia8c28e960027877eb4d45f12db7406902e755c03 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unnecessary assignment of binop results to temporariesErik Verbruggen2017-02-152-18/+22
| | | | | | | | | | | In many cases, the result can be directly assigned to the left-hand side. So leave it to the place where the binop is used to decide when to assign it to a temporary. Change-Id: I9a88a71a77aa73afe88007eca744d3782fca34ac Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix typo in documentationFrederik Schwarzer2017-02-141-1/+1
| | | | | Change-Id: I1e7b73a8d5ae124c381eba45caa4998df56bfe37 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Enable register allocator on Win64Erik Verbruggen2017-02-141-13/+18
| | | | | | Change-Id: I4474f1ce01a6daa7cf4fb431f100cb8a9e094d6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace usage of QSignalMapper by lambdaOlivier Goffart2017-02-147-29/+9
| | | | | | | | | | | | | | | | | QSignalMapper ought to be deprecated soon. It simplifies the code, too. There is still one use in QQuickGenericShaderEffect which is a bit complicated to get rid of. A very similar use of QSignalMapper was in use in QQuickOpenGLShaderEffectCommon but was removed in commit 8c745d80, the same should be done for QQuickGenericShaderEffect. (Note the QueuedConnection in qquickparticlesystem is there because the QSignalMapper used to be in the main thread, meaning a round-trip via the event loop) Change-Id: I331b787becbad37f717035bf119bafd7a7214630 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Make better use of the remaining memory before calling GCLars Knoll2017-02-131-1/+19
| | | | | | | | | | Some slots still have free memory available. If we only need to allocate a small object, check if we can split up one of these slots before giving up and starting a GC cycle. Change-Id: I11fb9d53c607274dbb5fd0bc02088ed94bfe7c4e Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix a bug in Chunk::sortIntoBins()Lars Knoll2017-02-131-58/+122
| | | | | | | | | | | | | | | The bug lead to us not sorting all freed memory into the bins for the allocator to find. The lead to memory being 'lost' in the garbage collector. Add an assertion that checks for lost memory when we're running with aggressive GC. Also make sure we don't run GC twice in a row when aggressive GC is enabled. Change-Id: I4fb6732acce8a2e66258fa70fb7d8f1f939cfd9f Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix a potential crash in pushWithScopeLars Knoll2017-02-131-2/+6
| | | | | | | | | | | toObject() can potentially allocate a new object. If a GC accurs between that allocation and newWithContext(), we'd free the withObject Fixes a crash on test262 ch12/12.10/12.10-2-1 when running it with aggressive GC. Change-Id: Id8e957a748658a8f31ae39ff83509e9574ed51f7 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Rename Window.targetScreen to screen, and pick up changes to the screenTor Arne Vestbø2017-02-116-39/+29
| | | | | | | | | | | The screen property can be used for both setting the initital screen, and for reading out the current screen, so 'targetScreen' was not an ideal name for this property. Change-Id: I1b617085b1e8e0e437355740be5d3cee9379c47f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Prospective fix for native ARMv7 and ARM64 buildsSimon Hausmann2017-02-104-0/+15
| | | | | | | | | | | Don't try to instantiate the presumed "cross-assembler" twice, and also exclude the Yarr JIT from the devtools build. It requires a loadPtr enabled assembler (disabled in V4_BOOTSTRAP builds) and we don't need the regexp engine. Change-Id: I3f36b32decdbf51133b8fef641f5630c5f5102b1 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix MSVC warning about imported symbols when linking qmlcachegenFriedemann Kleint2017-02-091-0/+7
| | | | | | | | | | | | | | | | We don't have anything to export in qmldevtools, not even "autotest" exports. The warning was: qmlcachegen.obj : warning LNK4217: locally defined symbol ??0ExecutableAllocator@QV4@@QEAA@XZ (public: __cdecl QV4::ExecutableAllocator::ExecutableAllocator(void)) imported in function "bool __cdecl compileQmlFile(class QString const &,class QV4::EvalISelFactory *,struct Error *)" (?compileQmlFile@@YA_NAEBVQString@@PEAVEvalISelFactory@QV4@@PEAUError@@@Z) Change-Id: I5be9d905eee90615e2bb52fc110f81f2c558c7e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix crash when generating cache filesSimon Hausmann2017-02-081-1/+6
| | | | | | | | | Make sure that the allocator in bootstrap builds really just allocates memory for the generated code and otherwise doesn't try to allocate executable memory. Change-Id: Ic40724903706ae98ef272a028e7d8299400e232b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove remaining ARM #ifdef in qv4assembler.cppSimon Hausmann2017-02-082-16/+38
| | | | | | | | | The thumb2 workaround for cleaning up the frame pointer can go into the target platform template specialization. Task-number: QTBUG-58572 Change-Id: Ib852481358e320efdfd49270f3bc5a5d2ee2b7fd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix ARM64 buildSimon Hausmann2017-02-0811-42/+163
| | | | | | | | | Add the ARM64 assembler to cross-compilation. Task-number: QTBUG-58568 Change-Id: I91461ebf79fb83e31e8ae2962ab0e155d308281a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable cross-compiling binops from 32-bit host 64-bit targetSimon Hausmann2017-02-081-58/+135
| | | | | | | | | | Move the #if CPU(X86) specific bits into a template specialization, so that we won't try to call 32-bit specific methods on the assembler when targeting a 64-bit architecture. Change-Id: I3b7e6c2c77d8a34ef50913cbfd34dad2c3199923 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Local storage: Improve error messageFriedemann Kleint2017-02-081-2/+5
| | | | | | | | | | | Use %-placeholder formatting instead of concatenating strings which may not work in some languages and pass path through QDir::toNativeSeparators(). Amends change f96b77bf46a29b1c09d6ebff2f18a475c7ca0b2f. Change-Id: Iee6782a41513529bb6e4c0cde62b477a68bbcd02 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilation of qmldevtools on Windows when cross-compilingSimon Hausmann2017-02-081-4/+24
| | | | | | | | | | | | The use of wildcards in SOURCES is an unspecified "feature" and it turns out that it doesn't work when doing option(host_build) and cross-compiling. We could use $$files(), but there is no truly good reason for using it for only some directories and not others, so this is now a manual expansion. Task-number: QTBUG-58705 Change-Id: Ib3bd7bbba01fe4130703d5635fa344b62caea5bb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix register argument passing in cross-compiled code when host == x86Simon Hausmann2017-02-073-13/+4
| | | | | | | | | Replace the use of host-dependent pre-processor macro with variable usage from the target platform template specializations. Task-number: QTBUG-58577 Change-Id: I7e5ca4b79c2238954d6be7ec6b110eadd78a104d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a crash in canvas2d when calling some methodsLars Knoll2017-02-071-6/+6
| | | | | | | | | | | | This fixes a regression introduced in change 4d23faf34192cef372f846dcf02fd8cc398b14c0, where some return values from functions weren't properly encoded as QV4::Value. Task-number: QTBUG-58683 Change-Id: I9dc5f1eb8f5779c58f8b062b9ae3d02284ab2678 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix assembler cross-compilation on 32-bit hostsSimon Hausmann2017-02-076-15/+29
| | | | | | | | | The GOT register restoring logic needs to be done via TargetPLatform members instead of plain #ifdefs. Task-number: QTBUG-58569 Change-Id: If00d3f92558361ad5dcb20c3ff7eff78d31d75d3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Eliminate VALUE_FITS_IN_REGISTER #ifdefSimon Hausmann2017-02-063-39/+46
| | | | | | | | | | These macros do not apply anymore when cross-compiling. This patch replaces the macro use for locals JS stack initialization with register size dependent operations as well as when loading the this object into a stack slot. Change-Id: Ia986f6dbfa37c6d6ce2f1de6253e7008e4aa87dd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDoc: sync description with described code layoutFrederik Schwarzer2017-02-062-7/+8
| | | | | | | | | | | The table with several code examples was rearranged once and the code description still refers to the old layout. Old: left-right New: upper-lower but with labels for C++ and QML code so it's safe to refer to the labels. Change-Id: I0edb9adc747b5081ec52445e132ce38784703e46 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix a crash in setInternalClassRobin Burchell2017-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Revealed by the ES6 testsuite, ./test/built-ins/Object/freeze/15.2.3.9-2-1.js and probably others. We cannot unconditionally dereference memberData, it may not always exist. ES6 tests test/built-ins/Object/freeze before: === Summary === - Ran 92 tests - Passed 66 tests (71.7%) - Failed 26 tests (28.3%) after: === Summary === - Ran 92 tests - Passed 90 tests (97.8%) - Failed 2 tests (2.2%) Change-Id: I22a6c9ca081394ba15edfde09f73769eb3ce47b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: added doc for parameter windowNico Vertriest2017-02-031-1/+1
| | | | | | | Undocumented parameter 'window' in QSGRendererInterface::getResource() Change-Id: I13cd520ad0b06abe1ad76be7aec83eae5c3e4d7c Reviewed-by: Martin Smith <martin.smith@qt.io>
* Add missing include to qmlengine.cppFriedemann Kleint2017-02-031-0/+1
| | | | | | | | | | | | | Fix error: qml\qqmlengine.cpp: In member function 'QString QQmlEngine::offlineStorageDatabaseFilePath(const QString&) const': qml\qqmlengine.cpp:2191:51: error: variable 'QCryptographicHash md5' has initializer but incomplete type QCryptographicHash md5(QCryptographicHash::Md5); ^ qml\qqmlengine.cpp:2191:28: error: incomplete type 'QCryptographicHash' used in nested name specifier QCryptographicHash md5(QCryptographicHash::Md5); Change-Id: I1f116758fe061a6bad4718cc264cf608dd3cc0b5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Allow to pass all the relevant info to QQuickPixmap::isCachedAlbert Astals Cid2017-02-033-4/+4
| | | | | | | | | | | | | If we don't allow to pass the QQuickImageProviderOptions to the isCached we are missing one of the three components that identify if the pixmap is actually cached. Old code is ok for the QQuickAnimatedImagePrivate use case since it always creates QQuickPixmap with the default QQuickImageProviderOptions options, but if someone else wants to use QQuickPixmap::isCached they will need to be able to pass the options part of the cache key. Change-Id: I3153ad9ed30e7332b5cb4896dcebd408f2bd9afe Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Canvas Item: Prevent polish loop when calling requestAnimationFrameAndy Nichols2017-02-022-1/+21
| | | | | | | | | | | | Currently if you call requestAnimationFrame within the callback given by requestAnimationFrame there is a polish loop. This is however the common way when using Canvas2D in the browser to get screen refresh rate animations. This patch makes sure that polish won't be called when processing polish items by calling polish indirectly. Task-number: QTBUG-55778 Change-Id: Ib96e39f7ca3cecc33609976e9049cc309768f9f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* add QQmlEngine::offlineStorageDatabaseFilePath(db), use in LocalStorageShawn Rutledge2017-02-024-29/+31
| | | | | | | | | | | This is C++ API to get the actual storage path for a particular database. [ChangeLog][QtQml] Added QQmlEngine::offlineStorageDatabaseFilePath(dbName) to allow getting the actual storage path for a particular database. Task-number: QTBUG-52013 Change-Id: I1cbd9454c537f08c97f4dafc06fd6b14e81c51af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow selecting armv7 as target architecture in qmlcachegenSimon Hausmann2017-02-012-5/+28
| | | | | Change-Id: I36e8f95e83ea3de6553145efc762e3bc46f60071 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Added the ARMv7 cross-assembling JIT::ISel to the qmldevtools buildSimon Hausmann2017-02-011-0/+5
| | | | | Change-Id: Ib508ad7a02293b0deead818bb0eb3bdfb474a278 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Include the ARMv7 assembler in the qmldevtools bootstrap buildSimon Hausmann2017-02-0113-28/+295
| | | | | | | | | | | | | | | | | | | | | | | | | Even when the C++ target is not ARMv7 we want to include it in order to be able to generate QML cache files with code ahead of time. This requires a few changes: * The Jump classes need to move from the AbstractMacroAssembler super-class into the concrete assembler sub-class, in order to use it in specializations. * Some of the template specializations in LinkBuffer for example or for platform dependent operations need to be pre-processor enabled when bootstrapping * The generic loadPtr/addPtr etc. functions need to move to the concrete assemblers to be able to call the correct 32-bit or 64-bit variations. * We need to force what looks like a loss of precision to the compiler in the 32-bit ARMv7 linking code when linking jumps. Finally then we can explicitly instantiate at least QV4::JIT::Assembler for ARMv7 when bootstrapping. Currently only on x86-64 hosts, but that is a temporary limitation. Change-Id: I501db2360e1fded48f17f17d9e87252d47f8537e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove platform ifdefs for ISE::convertTypeToDoubleSimon Hausmann2017-01-312-16/+28
| | | | | Change-Id: I75db85fbd601d4790a3cb9af483474a976d00e86 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove platform ifdefs for generateCJumpStrictUndefinedSimon Hausmann2017-01-313-42/+38
| | | | | | | | Use templates to perform the platform encoding dependent way of comparing a given value against undefined. Change-Id: I7e7726455023200bd74e62d2dbc4e2c2908d9e64 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove platform ifdefs in JIT::ISel::visitRetSimon Hausmann2017-01-313-138/+132
| | | | | | | | Use templates to encode the various platform dependent ways of encoding the return values. Change-Id: Icb481a75924da7d78396ff1c95474dc9c29ca494 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Eliminate platform #ifdef for loading stringsSimon Hausmann2017-01-312-7/+13
| | | | | | | | Use templates to abstract the two different ways of making a QV4::Value hold the address of a managed, in this case to a runtime string. Change-Id: Ibe9ae10fdcef68dbfc7c61fbb3ec8b3a1d50f1a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make the JIT ISelFactory a templateSimon Hausmann2017-01-313-3/+12
| | | | | | | | That way qmldevtools can - in the future - instantiate that also for the cross-compilation targets. Change-Id: If15b195f24e54226dc4f2fd9f0ad6874f44cb5af Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Bootstrap build fixSimon Hausmann2017-01-311-2/+5
| | | | | | | | Avoid the cache flushing code, it's of no use and won't compile due to the use of inline assembly. Change-Id: I1542b48f53f9210943bcf1f7cc5cc03f4abca695 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Re-do QML type compilation of ahead-of-time generated QML cache filesSimon Hausmann2017-01-316-3/+269
| | | | | | | | | | As we currently lack the ability to do type resolution at AOT cache generation time, we need to re-do the work after loading the cache file, making us essentially only re-use the code and avoiding the step of parsing. Change-Id: I12844692d4766345d8a313b59d21abf1f868e2d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove branch compaction #ifdefSimon Hausmann2017-01-3110-68/+155
| | | | | | | | | | | | | Since the #ifdef for ARMv7 and ARM64 makes it impossible to cross compile, we need to replace it with a template specialization of LinkBuffer. The "old" LinkBuffer becomes LinkBufferBase, then there's a generic LinkBuffer that's a sub-class of LinkBufferBase. Then there's a BranchCompactingLinkBuffer template that implements the compaction and two ARMv7 and ARM64 specializations of LinkBuffer<T> end up being sub-classes of BranchCompactingLinkBuffer instead of LinkBufferBase. Change-Id: Ib62fe24aa6c3570dfa311edc39fde6fb5975f3cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlImportDatabase: Fix static build with clangRobert Loehning2017-01-311-0/+2
| | | | | Change-Id: I73895a1938c60a9d83f7e8bbe306eb0c3f05a5ed Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix intermixed 32-bit/64-bit buildSimon Hausmann2017-01-311-4/+23
| | | | | | | | | | | | | Replace the use of TrustedImmPtr(0) with target register size dependent template functions, as TrustedImmPtr is forbidden for non-zero values (non-relocatable code) and for zero still ends up using functions in the underlying assembler that are behind #ifdefs. Similarly the use of xorPtr does not compile with ARMv7, so use the zeroRegister abstraction instead. Change-Id: I84c1792847bd51d1cf5f305c3589517583b816f3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Correctly specialize TargetPlatform as templateSimon Hausmann2017-01-316-40/+105
| | | | | Change-Id: I37d2a2d74e150b92f5a338d799def337dcb8abd9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove 64-/32-bit platform ifdef in assembler instruction selectionSimon Hausmann2017-01-312-71/+81
| | | | | | | | We can replace that code with a compile-time if statement where the compiler will throw away the unused part. Change-Id: I827633a14b3025bb7acaef6f85a52682d6df3da1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>