aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
...
* | Optimize Runtime::method_get/setElementLars Knoll2017-05-103-29/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | This is now actually just as fast as the lookup code, so disable the generation of lookups for indexed accesses for now. This saves some runtime memory, as we don't need the data structures for the lookup. We can reintroduce lookups, once they offer a real performance benefit. Change-Id: Idc3fa7b248e2e25b4b2cd60d5053e2815634c8b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9.0' into 5.9Frederik Gladhorn2017-05-105-47/+60
|\| | | | | | | | | | | | | Contains the fix for tst_TouchMouse::hoverEnabled which has caused numerous failures in the last few days. Change-Id: I1e523087a53d1df0334d602e4125f5cddc9bf470
| * Update the alloca() support in QtQmlOswald Buddenhagen2017-05-103-45/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qv4alloca_p.h dates from April 2013 and contained just the #includes, whereas the code in qtqmlglobal_p.h was introduced earlier this year in commit 87f016ea9eddc874d5cba7d79d0a487d5ef61761. This commit moves the macros to qv4alloca_p.h and centralizes the support there. This also updates the #include detection mechanism, by using QT_CONFIG(alloca_h) to determine which #include to use. See commit 98c1d516b7f7624f7fcd7b9046783e3903a6a42b in qtbase for more details. Task-number: QTBUG-59700 Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4b38005ce2ecb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Don't crash: Connections with a signal on a nonexistent objectShawn Rutledge2017-05-071-1/+4
| | | | | | | | | | | | Task-number: QTBUG-56551 Change-Id: Ide09f177d3f6a3e9902f8ea904b3e6e4b998bd39 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Prospective build fix for architectures where we don't support the JITSimon Hausmann2017-05-071-1/+7
| | | | | | | | | | | | | | | | | | | | Always export the isel factory method for qmlcachegen, so that we can link. Task-number: QTBUG-60597 Change-Id: Ia348ee5dfe0892878e8fce6c8afd30bb8eb54a51 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Optimize other lookupsLars Knoll2017-05-084-24/+58
| | | | | | | | | | | | | | | | | | Add some more optimized lookups for accessing properties stored inline or in the memberData. Change-Id: Id74901d1dd91fd60933bf164c2bf90fed86232e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Re-add some inline property storageLars Knoll2017-05-0811-37/+206
|/ | | | | | | | | | | | | | | | | | | | | | | | | It turns out that not using any inline property storage comes at a relatively high price in terms of memory consumption, as we always need to also create a memberData for any object. This avoids the memberData creation in quite a few cases, as we use the additional padding we have up to the 32 byte boundary given by the memory manager to store some property data. This complicates property access somewhat. To avoid performance regressions because of this, add specialized QV4::Lookup functions that optimize for properties that are inline or in the memberData struct. Change seems to be performance neutral on v8-bench on x86_64, but reduces peak memory usage when running the benchmark by around 20%. Change-Id: I0127d31a2d6038aaa540c4c4a1156f45ca3b7464 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Add missing breakThiago Macieira2017-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | Commit 2a812493bc97983b85110f853d3dbe57b54667d8 added the VariantMap case but forgot to add the break before it (there wasn't a break because it fell through to default: break). This is a 6.5 year old issue, though it affected no one because setVariantMapProperty checks the destination's type again. Found by GCC 7: qqmllistmodel.cpp:1075:62: warning: this statement may fall through [-Wimplicit-fallthrough=] target->setVariantProperty(targetRole, v); ^ qqmllistmodel.cpp:1077:13: note: here case ListLayout::Role::VariantMap: ^~~~ Change-Id: Ica9894dc9b5e48278fd4fffd14bb35efd18a8a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add qtConfig(dlopen) check before adding libdlKimmo Ollila2017-05-042-2/+2
| | | | | Change-Id: Iad67b9719fe6336b8dfc28de2e88463c588a0849 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QV4BooleanObject: Avoid GC'd allocations when calling toString()Robin Burchell2017-05-031-1/+1
| | | | | | | Use the global strings instead. Change-Id: Ia43045ca3f40e80d44956cf8e38511cfc4c8a8bb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlComponent: Fix heap buffer overflow with bogus inputPeter Hartmann2017-05-031-0/+5
| | | | | Change-Id: I8a725018a5aeb39df370f856cd77d887faa511e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix concurrent loading of the same qmldir from different scriptsAndy Shaw2017-05-022-23/+30
| | | | | | | | | | | | | | | | QQmlQmldirData keeps a pointer to a QQmlScript::Import, and an integer priority. Each Blob that is waiting on it was setting its own import and priority even though the QQmlQmldirData itself was shared. This resulted in whichever one began loading last succeeding to load, and the rest failing. This change instead stores the import and priority data per-dependent Blob Fix was originally done by Josh Faust <jfaust@suitabletech.com>. I added the test. Task-number: QTBUG-30469 Change-Id: Id3d15569a999a7c22eeb12b431e5daf1ddae51dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix memory leak in the memory managerLars Knoll2017-04-281-2/+32
| | | | | | | | | | | | | | | | | There was a bug in Chunk::sweep() that would lead to parts of the memory not being freed as it should have been. This happened when an object 'overflowed' into the next index of the estendBitmap, where we then would not correctly clear the extends bits. Fixes performance degradation in qmlbench's delegates_item_empty_jscreation.qml over multiple runs. Change-Id: Ia2cecd2ff218e4258a067a74631b5479589b7a7e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-04-277-173/+195
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-04-277-173/+195
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qtqmlglobal.h src/qtqmlglobal_p.h src/jsruntime/qv4global_p.h src/qml/compiler/compiler.pri src/qml/compiler/qv4ssa.cpp src/qmldevtools/qtqmldevtoolsglobal_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I55c5d015b2cb1053b83b9c61caaf004fb49ee486
| | * V4: Fix issues with very small loops5.8Erik Verbruggen2017-04-183-157/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loops consisting of just a single basic block (e.g. a do-while loop with no nested loops or if statements) have a back-edge to themselves. There were 2 problems: - loop detection would create LoopInfo for any loop header referred to by blocks inside the loop (and a 1 block loop doesn't have body blocks), nor would it mark the loop header as such - when splitting critical edges, the newly inserted block would not be marked as part of the loop This is a problem specifically for 1 block loops: the block ends with a CJUMP, so the back-edge is a critical edge. So the new block inserted by edge splitting wouldn't be marked as belonging to the loop. The end result was that the life-time intervals for temporaries that are defined before the loop, but that are used inside the loop, and not after the loop, would have their life-time ended before the loop ends (instead of spanning the whole loop, *including* the back-edge). This in turns could lead to the stack/register allocator re-using the storage for that temporary, resulting in strange things happening. Task-number: QTBUG-59012 Change-Id: Ic946c73913711272efea2151cb85350412ca2fde Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * fix QtQmlDevTools in framework builds in a better wayOswald Buddenhagen2017-04-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6767fcfaf basically gave up and gave the module an own set of headers. however, we now have improved infrastructure for borrowing headers. while this may look uglier, the maintenance burden is lower, and it's consistent with other bootstrapped modules. Change-Id: I6ddcbbc01fa085a3c6bf333b03a9fdfc19061836 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * switch to new way to refer to libdlOswald Buddenhagen2017-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | note that the condition is insufficient (it should include qtConfig(dlopen)), but this is just consistent with the c++ code. Change-Id: I4b447ff504539e4dc07ece3d696e5a85b2f4cc50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix calling of JS functions with more than 6 parameters from C++Simon Hausmann2017-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to allocate enough space on the JS stack to include the calldata members _and_ the parameters when using more than ReservedArgumentCount parameters. Task-number: QTBUG-60396 Change-Id: I7fb2e44550fe081c43b8583f0cd370feb70db159 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Run includemocs in qtdeclarativeThiago Macieira2017-04-2631-0/+57
| | | | | | | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Doc: correct link errorNico Vertriest2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | qqmlengine.cpp: cannot link to LocalStorage.OpenDatabaseSync Change-Id: I37ee96072a1f1973dd501b6c4c2950f51a4224d2 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Doc: Update documentation for QML module definition fileVenugopal Shivashankar2017-04-261-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A qmldir is unique for each major version of the module, which was not made explicit in the documentation. Task-number: QTBUG-60053 Change-Id: I53285c541981ae328373875704e98014a5889c4b Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQmlApplicationEngine: Fix using invalid pointersRainer Keller2017-04-261-2/+9
|/ / | | | | | | | | | | | | | | | | | | When a root object was deleted before QQmlApplicationEngine the invalid pointers stayed in the list of root objects leading to crashes when destructing QQmlApplicationEngine. Root objects are watched for destruction and removed from the list. Change-Id: I1babab54dbb7d7b16ed883ada5b3e420ca8690cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix GC corruption on macOS and possibly some other OSesLars Knoll2017-04-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking mmap'ed memory as unneeded, leads to it being zeroed out on both Linux and Windows. Unfortunately that behavior is not defined by POSIX, so BSD based OSes (and possible others as well) do not do this. We do however rely on getting zeroed out memory whenever we allocate a new Chunk for the garbage collector. To work around this, zero out memory we deallocate on those platforms. Task-number: QTBUG-59278 Task-number: QTBUG-59977 Change-Id: Idde812db8537b63b9e9df7de41620ce0df09b6de Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Fix build without features.qml-interpreterTasuku Suzuki2017-04-211-1/+1
| | | | | | | | | | Change-Id: I5f9c00541c27377e8310d32bf045c2860eeffcb4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Silence GCC 7 warnings about implicit fallthrough in Qt codeThiago Macieira2017-04-205-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only deals with Qt code. MASM has a lot of those left. We should just update from upstream instead to get the fixes. qv4regalloc.cpp:660:52: warning: this statement may fall through [-Wimplicit-fallthrough=] if (leftSource->type == DoubleType || rightSource->type == DoubleType) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qv4regalloc.cpp:666:13: note: here case OpBitAnd: ^~~~ Change-Id: I7814054a102a407d876ffffd14b6b0e2d6b03689 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QML: clear the property cache on QObjectWrapper destuctionErik Verbruggen2017-04-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | If an external QObject is exposed to an engine through a QObjectWrapper, make sure to deref and clear the propertyCache reference in the object's declarative data when the QObjectWrapper is destroyed. This makes sure that there is no dangling propertyCache pointer when the object is subsequently exposed to another engine. Task-number: QTBUG-57633 Change-Id: I37f6793d8be65b23b4e81bb4ed91db18271261b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix for dangling object pointers in QQmlErrorsRobert Griebl2017-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This rarely happens - only seen with Delegates - when - an object is created during incubation - some error occurs in this object - the object gets deleted before the incubation run finishes Because the errors are delivered after the incubation run finished, the object() pointer of QQmlError is now a dangling pointer that will crash your application if accessed. Change-Id: Idd9fccbc58e4ada67bde3ca1aeec736aa9374789 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-117-45/+37
|\| | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| * Avoid access to declarativeData when isDeletingChildren is setBernhard Übelacker2017-04-106-39/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObject's members declarativeData and currentChildBeingDeleted share the same memory because they are inside a union. This leads to a problem when destructing mixed Widgets and QML objects. Then in QObjectPrivate::deleteChildren the member currentChildBeingDeleted is set. But unfortunatley QObjectWrapper::destroyObject retrieves the same pointer via declarativeData. This patch should avoid this by disallowing retrieval of declarativeData when isDeletingChildren is set (or at least adds a Q_ASSERT). Task-number: QTBUG-57714 Change-Id: I9ee02f79be3e8226c30076c24859b49b8dcfaecf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Prospective fix for static builds on Windows with QtQuickCompilerSimon Hausmann2017-03-281-6/+10
| | | | | | | | | | | | | | | | Don't define QML_PARSER_EXPORT to dllimport when doing static builds. Task-number: QTBUG-59767 Change-Id: I24acb2c51f54a0cde8d2e50a935ede876e5eb5b7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Speed up Qml library checksumming in developer buildsSimon Hausmann2017-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | The use of sha1 to determine if there were any changes in the Qml library in developer builds (for cache invalidation) works well, but it results in timeouts when running tests on ARM as type compilation takes too long. This is a developer feature and we might as well use a faster hash such as Md5 that is sufficiently reliable for our purposes. Change-Id: I917ae619c73a9cc821d888f16bfcccafeb8ebacc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Fix locals register allocation on ARM when cross-compilingSimon Hausmann2017-04-061-1/+1
| | | | | | | | | | | | | | | | r11 needs to be saved :). This ammends ecda87091f290daec34bee6b55dd9cf920ffdcff Change-Id: Ib69712527e04b9bcec4c9e74dea43a915e2bd0f9 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Fix support for jsTr() and QT_TR_NOOP in list elements when cachingSimon Hausmann2017-04-065-423/+544
| | | | | | | | | | | | | | | | | | Similar to the Qt Quick Compiler we need to do the expression simplification pass at cache generation time to extract translation calls in list elements. Change-Id: I267fc9647ab82bc83d6b087c06c0036df38238ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix double conversion code generation when cross-compilingSimon Hausmann2017-04-062-7/+15
| | | | | | | | | | | | | | | | | | We can't use QV4_USE_64_BIT_VALUE_ENCODING for deciding how generate code for checking if the tag of a value contains the necessary mask to detect doubles. Change-Id: Id5a5c1b136313aa4dfd2c997898e97cd4ebaeb83 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix shadow stack space handling when cross-compilingSimon Hausmann2017-04-061-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Both MIPS and X86-64 on Windows reserve space for four registers on the stack, that the called function may use to spill the parameters passed in registers. This needs to be handled without #ifdefs in order to support cross-compilation and from the looks of it it was also wrong on MIPS. Change-Id: If65a6a0f6f64b8536703d32e7678e30ad807f7c8 Reviewed-by: Julien Brianceau <jbriance@cisco.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix loading of ahead-of-time generated cache files when cross-compilingSimon Hausmann2017-04-062-1/+2
| | | | | | | | | | | | | | | | | | The target ABI is something that we must include correctly at cache generation time. The corresponding qmake variable is available in qtbase now, so we can use that and embed it in the generated data. Change-Id: Icd6e44824f5151535ce9ddac27687b7877288725 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix architecture selection when cross-compiling cache filesSimon Hausmann2017-04-061-4/+4
| | | | | | | | | | | | | | | | | | | | We pass essentially the values of QSysInfo::buildCpuArchitecture() to qmlcachgen as command line parameters, so our factory function must be aligned with the values returned (and documented) there. That means arm instead of armv7, arm64 instead of armv8 and i386 instead of x86. Change-Id: I89c196b6585f9ba9550c0deb17e8b529980aa448 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix engine parameter passing when cross-compilingSimon Hausmann2017-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | We currently use addressForArgument() only to access the incoming functions parameters in JIT generated code, which is the engine parameter. While not currently supported by the current set of cross-compiling assemblers, the use of sizeof(Type*) may become an issue in the future, so let's use the correct value right away. Change-Id: I3e44279257f595a8be2c61bcfe15070a90038eb7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix loading of strings when cross-compiling from 64-bit host to 32-bitSimon Hausmann2017-04-061-1/+1
| | | | | | | | | | | | | | | | The use of sizeof(Type*) is not allowed when calculating indices into pointer arrays. Change-Id: I5531efc80d0267eaceade76ad2b96d454eab9392 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Don't waste CPU cycles when checking whether a breakpoint is activeLars Knoll2017-04-041-5/+6
| | | | | | | | | | | | | | | | | | QV4::Function::sourceFile() actually malloc's a new string each time it's being called. Let's not call it unless we need its return value. Change-Id: I4e47422860549df5e1b5b19f3a68f027ff74f05a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix warning for -no-feature-temporaryfileStephan Binner2017-04-041-0/+1
| | | | | | | | | | | | Change-Id: Iaa4138610834f87b2a9379e707025d2e8a0fd59c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
* | Doc: remove const from QQmlListProperty getterMitch Curtis2017-04-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The function cannot be const, as QQmlListProperty's constructor expects a non-const reference. Errors can result from following the docs: '<function-style-cast>': cannot convert from 'initializer list' to 'QQmlListProperty<QObject>' Change-Id: I2268ab08a130181857c21340604a2251ba66967e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix Clang warning about member in template class not definedThiago Macieira2017-04-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | qv4isel_masm.cpp:285:44: warning: instantiation of variable 'QV4::JIT::Assembler<QV4::JIT::AssemblerTargetConfiguration<JSC::MacroAssemblerX86_64, QV4::JIT::TargetOperatingSystemSpecialization::NoOperatingSystemSpecialization>>::Void' required here, but no definition is available [-Wundefined-var-template] Depending on qv4assembler.cpp instantiating the same template that q4isel_masm.pp required is fragile. So move the definition to the header, next to the class. Change-Id: I27b55fdf514247549455fffd14b178ec9d4b508d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix build without features.animationTasuku Suzuki2017-04-033-3/+15
| | | | | | | | | | | | Change-Id: Ie45a2f01def64941a323973ea27446e3fc85a72b Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | V4: Set correct source locations for jumps out of conditionalsv5.9.0-beta1Ulf Hermann2017-03-311-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always want to place the jump on the last line of the conditionally executed statement, unless we might never execute the last line. In the latter case, that is if the inner statement is again a conditional, we use some token of the outer condition. This works fine with loops, as the loop condition is actually checked after each iteration, and it's plausible to the user that we jump there. With "if" statements, it's not so great. We cannot really explain why we jump back to the "if" token after executing the conditional statement. However, we have to add some source location to the jump instruction as otherwise it uses the source location of the last statement that had one, which is rather random. Task-number: QTBUG-59204 Task-number: QTBUG-59774 Change-Id: I48e331ce1c1830f236e16b75c9201a2f490d2092 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix encoding of primitive constants when cross-compilingSimon Hausmann2017-03-314-43/+100
| | | | | | | | | | | | | | | | | | | | QV4::Primitive is using host value encoding, which can differ from the target. The source of QV4::Primitive in the code generator is usually IR::Const, transformed via convertToValue(). That function becomes a template that converts to a simple target primitive type. Change-Id: If028aea9551d77d81eec306f60fd995c25b76710 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix arithmetic with constants inside eval() calls on 32-bit architecturesSimon Hausmann2017-03-301-0/+1
| | | | | | | | | | | | | | | | On 32-bit architectures we usually use an external constants table, which we need to make visible in the context. Change-Id: I0f7d813da1c6c893b8dd641dab5685a6db7fa9fa Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Fix value type encoding constant usage when cross-compilingSimon Hausmann2017-03-307-62/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our two value encodings use different masks for the upper 4 bytes. Depending on the target architecture we must use different values when generating code that uses these masks. This patch replaces the #ifdef'ed ValueTypeInternal_* enum values with two C++11 scoped enums that allows for the co-existence of both throughout the code base as well as selective use in the code generators. Change-Id: I380c8c28b84df2874cca521b78bfe7f9388ed228 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix stack pointer arithmetic when cross-compilingSimon Hausmann2017-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | Replace the use of size(void*) with target assembler specific values for the pointer size, when calculating offsets into the stack for poke/peek/push/pop and placing arguments onto the stack before calling functions. Change-Id: I3aff540f0083967e75b61e0c29dbeb4d9ecfa433 Reviewed-by: Lars Knoll <lars.knoll@qt.io>