aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
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>
* 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-158-10/+50
| | | | | | | | | | | 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-143-14/+4
| | | | | | | | | | | | | | | | | 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-111-2/+2
| | | | | | | | | | | 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-103-0/+12
| | | | | | | | | | | 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>
* 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-085-3/+7
| | | | | | | | | 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>
* 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 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>
* 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>
* add QQmlEngine::offlineStorageDatabaseFilePath(db), use in LocalStorageShawn Rutledge2017-02-023-0/+23
| | | | | | | | | | | 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-014-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* Move generateRuntimeCall macroSimon Hausmann2017-01-314-77/+78
| | | | | | | | Move it into JITAssembler for future use there. All it requires is making the assembler to use a macro parameter. Change-Id: I204e91d1b24eb02e476d8f4a43f3cd1665df0560 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move loading of register arguments into 8-byte register opsSimon Hausmann2017-01-311-46/+88
| | | | | Change-Id: I779fff3a925015c34162542648b8074692c0b974 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace ifdefs with templates when loading double constantsSimon Hausmann2017-01-311-10/+15
| | | | | Change-Id: I33155d8071d03250edefaf93f769c9629a5f827f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace platform ifdefs in copyValue with template specializationsSimon Hausmann2017-01-311-18/+18
| | | | | Change-Id: Iecc92f86a7314e4674f140251467c0654451abef Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove ifdefs in JIT::Assembler:storeValueSimon Hausmann2017-01-311-8/+14
| | | | | Change-Id: I4660bbf0dde4aef15be07ea61c1e0c181ec696be Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace more storeDouble 64/32-bit #ifdef variation with templatesSimon Hausmann2017-01-311-12/+16
| | | | | Change-Id: I56159645dd896eff0874129db6c0d53241ad901e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add fixes for INTEGRITYKimmo Ollila2017-01-318-75/+111
| | | | | | | Full definitions of types are needed in static_casts. Change-Id: I028ffc40a76cdb16cb297a181b3d9dfe9d09c945 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace platform #ifdefs in Assembler::storeReturnValueSimon Hausmann2017-01-312-48/+35
| | | | | | | | | | | Use RegisterSizeDependentAssembler for the 64- and 32-bit implementations of using the return value register(s). The fallback of returning the double via the stack is removed as it was not used in any of our JIT supported target architectures AFAIK. Change-Id: I27194edfe6676992d17bd09cc50ea7da4e339c22 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of #ifdef for JIT::Assembler::generateCJumpOnCompareSimon Hausmann2017-01-312-30/+59
| | | | | | | ...by moving the body into the 8-byte register operations class. Change-Id: I386c1af711935f08f48cb65adb2f1f4fec64322d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Template-specialize the mangling/demangling Assembler::loadDouble/storeDoubleSimon Hausmann2017-01-301-14/+51
| | | | | Change-Id: If8e566f31cf036459eba935fadb31359f436454a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QV4::Value constants of both encodings always availableSimon Hausmann2017-01-301-16/+29
| | | | | | | | | In order to be able to generate native code for either encoding then we need to have all constants available. Change-Id: I851fed70023d3dab11b1e70e1689ea88a98c8564 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>