aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Allow QtQml to compile with ICC 14.0 with -WerrorThiago Macieira2013-12-031-0/+3
| | | | | | | | | | | | Third-party source contains a static variable that is only used in debugging code (an ASSERT). cached-powers.cc(134): warning #2415: variable "double_conversion::kCachedPowersLength" of static storage duration was declared but never referenced static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers); Change-Id: I97ea9ada8f03d9fd45149fbc4bfdf61877498339 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix QQuickTextInput not overriding shortcuts (del/home...)Frederik Gladhorn2013-12-021-0/+2
| | | | | | | | | | | | [ChangeLog][QtQuick] QQuickTextInput would not accept delete/home/backspace/left/right keys when the key was used in a shortcut. Task-number: QTBUG-34517 Change-Id: I553af8247191ecdadcb4677e9fc85848270a95d3 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Set all attached section properties before emitting change signals.Martin Jones2013-11-302-8/+23
| | | | | | | | | | If we have bindings to the section properties, e.g. implementing manual section header creation, we want previousSection, section and nextSection to be set before emitting the change signals to prevent different results each time the binding is run. Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* When the MouseArea loses grab, an active drag should be cancelled.Robin Burchell2013-11-301-0/+6
| | | | | Change-Id: Icc784dd3265c211d9b077b692464591a41976354 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Add support pre-compiled bindings for QML custom parsersSimon Hausmann2013-11-294-8/+35
| | | | | | | | | | | | | | | | | | | | | | For example the x property in PropertyChanges { target: foo x: someItem.x - other.width / 2 } was compiled at run-time dynamically, which produces slower code (no type information available) and slows down the type instantiation, because the compilation happens every time at instantiation time (or later). With this change, when the custom parser behind PropertyChanges requests a binding ID for "x", the right hand side will be added to the bindings to compile, then compiled and later at run-time the QQmlBinding constructor that takes a QQmlBinding::Identifier can retrieve the correct compiled function from the QV4::CompiledData::CompilationUnit. Change-Id: I857fb2d39e82714b225bc9394b9904b795c6662b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Some documentation for the VME profilerUlf Hermann2013-11-291-0/+76
| | | | | Change-Id: Ifa36166e803e81484c6a96c732b72f0ee2412c28 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use the new object creation profiler in qqmlvmeUlf Hermann2013-11-292-1/+28
| | | | | | | | | | | | | | There are 3 ways to create objects: "Simple", "Cpp" and "Qml". This patch starts a new profiler whenever a new object is created. It's assumed that everything the interpreter main loop does between two creation instructions is related to the object just created. The componentComplete calls are profiled by restoring saved states of the profilers used during the creation of the respective objects. Task-number: QTCREATORBUG-10631 Change-Id: I2645eab7ba32dfb8749cb51ec888d0f0e8fef188 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a stack-based object creation profilerUlf Hermann2013-11-292-0/+173
| | | | | | | | | | | | | | | The simple instantiate-in-context way of profiling object creation doesn't work anymore because the VME's contexts don't necessarily map to C++ contexts anymore. The new profiler introduces two stacks of contexts, one for currently running ranges (such as components) and one for ranges that will be revived later to profile componentComplete() and similar things. Task-number: QTCREATORBUG-10631 Change-Id: Idf19b2adf062bc9c185b3bb5ff5229381f577645 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove old qml object creation profilingUlf Hermann2013-11-294-62/+1
| | | | | | | | | | The old way the object creation profiler works is unsuitable for detailed profiling as it only tracks top level components. Task-number: QTCREATORBUG-10631 Change-Id: I502d0e144f2965f5e09af8461b50b56c61de5b4b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Enable broken IBO fallback for Hisilicon Immersion 16 GPUEskil Abrahamsen Blomfeldt2013-11-291-0/+2
| | | | | | | | | This GPU is on the Huawei Ascend D1 and exhibits crashes in glDrawElements() when rendering scenegraph when the workaround is not turned on. Change-Id: Ic601d34c01e34faaa091a631cfed74c3601c9c43 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix accelerated property lookup on id addressed objectsSimon Hausmann2013-11-291-1/+2
| | | | | | | | | | | For properties on id referenced objects, we can ignore the lack of the FINAL keyword on properties, as we want the same "lexical" lookup rules like for properties on the scope or context objects. In addition we need to initialize the resolver on the returned temp, to ensure a successful type determination in the use of the id object afterwards. Change-Id: I496c942ade55aa331e6972f06b21c2c86d4b00a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix JavaScript signal connect on alias without other handlersSimon Hausmann2013-11-291-1/+6
| | | | | | | | | | | | | The changed handlers for aliases are connected lazily in the engine. QQmlPropertyPrivate::flushSignal is responsible for that and called in other places, for example when installing a onSomeAliasPropertyChanged handler. However we were missing a call to flushSignal when doing onSomeAliasPropertyChanged.connect(...), i.e. using the JavaScript connect API. Task-number: QTBUG-30493 Change-Id: Ia3f008626fd7af3f2cfbdd30d13fb83158bed4d5 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warnings: initialize Instruction variables created on the stackThiago Macieira2013-11-292-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.7-4.9 are right that the "code" member is used uninitialized. In fact, GCC 4.9 was quite assertive about it: qqmlinstruction_p.h:538:102: error: ‘def.QQmlInstructionData<8>::<anonymous>.QQmlInstruction::instr_common::code’ is used uninitialized in this function [-Werror=uninitialized] static void setData(QQmlInstruction &instr, const DataType &v) { memcpy(&instr.FMT, &v, Size); } \ ^ (It says "is used uninitialized" for this particular case; the "may be used uninitialized" appears in other places) The analysis is as follows: - variable declared on qqmlcompiler.cpp:1467: Instruction::SetDefault def; - type is POD, so no initialization is performed (def contains garbage) - on qqmlcompiler.cpp:1468 we use the variable: output->addInstruction(def); - QQmlCompiledData::addInstruction is inlined and does: QQmlInstructionMeta<Instr>::setData(genericInstr, data); - which is the call above, doing a memcpy with a source (&v) equal to the uninitialized "def" variable - result: memcpy is copying uninitialized bytes Valgrind doesn't report this because it doesn't care about copying uninitialized data. It will only complain if a decision is made based on it, which we don't since the first thing we do after the memcpy is initialize the member. The solution is simple to not copy the common part of the instructions. This way, we save 8 bytes of unnecessary copying and we still keep the warning if a member of an extended instruction isn't set. Change-Id: I940b40ea9aa61c7386e5cced4a7865be7bfddb5d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Set sampler precision in shifted distance field text shaderEskil Abrahamsen Blomfeldt2013-11-281-1/+1
| | | | | | | | | | | | The precision would default to lowp and we would attempt to call smoothstep(mediump, mediump, lowp) which was a non-existent overload on some drivers, thus causing a compiler failure. We can use mediump for the sampler, like in the regular distance field shader. Task-number: QTBUG-35122 Change-Id: Ib50325d48fe7e0d25559da97e7f53e5170f705a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Slightly accelerate access to value type propertiesSimon Hausmann2013-11-285-71/+84
| | | | | | | | | | | We can't do a fast property index based access on them, due to the inability to read individual fields from the original object (i.e. the logic in QQmlValueTypeWrapper). However what we can determine and propagate is the type information of the individual properties, i.e. that the x and y properties of a QPointF are always doubles. Change-Id: Iee71ece2117294b7bc0b93deb0a77d7c51148b11 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a QML debug config option QML_LOOKUP_HINTS to find non-final propertiesSimon Hausmann2013-11-281-0/+12
| | | | | | | This helps to optimize property access, especially for attached properties. Change-Id: Id47a9c5f184f84ce5ab813d3b01d1a6c6031233e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for accelerated property access to QML types and namespace supportSimon Hausmann2013-11-2820-87/+261
| | | | | | | | | | | * Resolve lookups in namespaces at compile time and instruct the SSA optimizer to eliminate reads from the namespace (QQmlTypeWrapper) if possible. For example access to attached properties of types (i.e. MyNameSpace.ListView.isCurrentItem) requires neither reading the namespace nor the type. * Add support for accelerated lookup of attached properties Change-Id: Ib0b66404ed7e70e1d4a46a1ac8218743a4cc8608 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* TextInput: call fixup() when appropriateJ-P Nurmi2013-11-271-2/+2
| | | | | | | | | | [ChangeLog][QtQuick] Fixed TextInput to call fixup() on its validator when being accepted or losing focus, and the validator reports that the input is in "intermediate" state ie. the input should be fixed up. Task-number: QTBUG-35128 Change-Id: I4b15406c584a9647bcf892badfaf6d845868fbf1 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Delay renderWindow with a timerRobin Burchell2013-11-271-2/+6
| | | | | | | | | | Add an exhaust delay to QSGGuiThreadRenderLoop. Some updates may be done with posted events, and maybeUpdate event competed with those, leading to partial updates and frames drawn twice. Change-Id: I532bff692c597eeba5bbd6def89ae68c80fdd69b Done-with: Mikko Harju <mikko.harju@jollamobile.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Prospective fix for crashes when sorting JS arrays on WindowsSimon Hausmann2013-11-271-6/+2
| | | | | | | | | | std::sort doesn't seem to like sorting empty arrays, so check the size before sorting. Task-number: QTBUG-33658 Change-Id: I841259939ea3bf850d23c129744c322ed46a95fe Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix build with QT_NO_ACCESSIBILITYThomas McGuire2013-11-261-1/+1
| | | | | | | "q" was an unused variable, which triggered a warning/error. Change-Id: I83bdc63a7caa12a5cd48331729492c0f36ed6fa0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Merge "Merge branch 'release' of ↵Lars Knoll2013-11-2632-81/+371
|\ | | | | | | ssh://codereview.qt-project.org/qt/qtdeclarative into stable" into refs/staging/stable
| * Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-11-2632-81/+371
| |\ | | | | | | | | | | | | | | | into stable Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
| | * Fix out of bounds array access when index is integer and negativev5.2.0-rc1Simon Hausmann2013-11-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the index is a double, the branchTruncateDoubleToUInt takes care of branching when the index is negative, but when it's an integer we need to perform that check ourselves. Without the patch it's rather easy to cause the application to crash. Change-Id: If908923ddc2077b3fb3dd42350f038ff0072e8e1 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Use QFontDatabase to check if a font is scalable.Yoann Lopes2013-11-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The flag set in QFontEngine was not always correctly set, use QFontDatabase instead which is slower but should always be correct. We fallback to native font rendering when the font is not scalable. Change-Id: Ie9a2397abd42890d0fb05bc2f9c46a60040296f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * Stop render thread regardless when the window is being destroyedGunnar Sletta2013-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a window is shown and quickly hidden again we can get to a state, on a asynchronous windowing system API, where the isExposed=true event has been pushed to the event queue but not yet processed at the time the user calls hide(). As hide() immediately sets isVisible() to false, we end up with isExposed=true and isVisible=false which prevent the WM_Obscure event to be sent to render loop which means the render thread thought the window was still on screen when we reched the shutdown in WM_TryRelease. Changed WM_TryRelease handling to disregard window state when the window is being deleted. This forces SG and GL cleanup and stops the thread. Task-number: QTBUG-35055 Change-Id: Ibac5aa27354d6450f30a61450214cb785ab855bf Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Fix rendering of Flipable content.Gunnar Sletta2013-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a batch is merged in the renderer, we use the z component to stack the item front to back. This works because each item is guaranteed to have a z-range of 0->1. However, when a projective matrix is used, we need to compensate for the implicit [x,y,z]/w, which GL applies to gl_Position after the vertex stage completes, so that this guarantee still holds. Task-number: QTBUG-35020 Change-Id: I254a3d4dc9ad22f53717160ec6ad8f3a27b43d1c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * No assert when the focus changes and a window has no active focus item.Frederik Gladhorn2013-11-251-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Fix crash when showing and hiding a window that has no active focus item. QtQuickControls hit the situation where a popup window was shown without ever having an active focus item. When then closing the popup, clearFocusInScope would assume it had to always modify the old focus, but in this case the focus would be on the window itself, so there is nothing to update. Task-number: QTBUG-35057 Change-Id: Ifbde4689d39f98b13e6f90573cb22e28bb86f2c4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| | * Fix memory corruption in QML expression compilationSimon Hausmann2013-11-254-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We store QQmlPropertyData pointers in our IR for Qt meta-object property resolution at compile time. As it turns out however, it is possible that these pointers change after retrieval from the QQmlPropertyCache, as the cache may change later in the compilation process. Therefore we must do what also QQmlCompiler does by storing a copy of the QQmlPropertyData. For the JS IR we can do that conveniently through the IR memory pool. A side-effect of this bug was that QQmlPropertyData pointers were re-used and so the identity check in the isel later such as _function->contextObjectDependencies.contains(m->property) for dependency tracking failed. In the example given in the bug report it was determined that the window.contentWidth property wouldn't need a property capture, and therefore the binding was not re-evaluated as window.contentWidth later in the binding evaluation phase received its correct value. This patch also fixes the incorrect debug output names assigned to JS binding expressions, where the index used to look up the name is per compiled object, not per QML component. Task-number: QTBUG-35063 Change-Id: I3e5bbfaac11e5c122a2ed15a3e486a93988e1b6e Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Allow for QtQml and QtDeclarative to co-exist at run-timeSimon Hausmann2013-11-252-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes QQmlData to share the very first bit with QDeclarativeData, to indicate if the QObject in question is exposed in the QML1 or QML2 run-time. Task-number: QTBUG-35006 Change-Id: I3aa1d7c99038792011afd9f481ad30d9b981721f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Do not crash when resizing invisible (non-tracked) windows.Gunnar Sletta2013-11-251-3/+4
| | | | | | | | | | | | | | | Change-Id: I776c21a0f675d2dbe831325cef2c1c2a103e03e5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Android: Add qmltooling plugins to apkDaniel Teske2013-11-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-10560 Change-Id: Ifabe6a74552dbc74b1de3030f8d60efda865f84a Reviewed-by: Aurindam Jana <aurindam.jana@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * Be even more tolerant towards broken platform behavior.Gunnar Sletta2013-11-227-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the platform (Mac in particular) sends us exposes for windows which are not renderable, we store it for later and fake expose events when we get resized. Task-number: QTCREATORBUG-10814 Change-Id: I909bb5a920550589322afd97ae1834884754cf81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * QtQuick.Dialogs MessageDialog docsShawn Rutledge2013-11-226-15/+203
| | | | | | | | | | | | | | | Change-Id: Ic229a26c395be0542409ba3e13739e55b6ffb521 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Safeguard the threaded renderloop against incorrectly exposed windows.Gunnar Sletta2013-11-221-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac we had a situation where we got expose events for windows which were either 0x24 in size or completely off the screen. These would result in makeCurrent failing and lead to crashes later on in the scene graph. Safeguard against invalid dimensions during initialization and abort after a call to makeCurrent if any of them fail. Task-number: QTCREATORBUG-10814 Change-Id: I9063ea4d078eea3914666e4c155d141a1502e2ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| | * Avoid symbol clashes when linking QtDeclarative and QtScript staticallySimon Hausmann2013-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Re-define the three symbols we actually implement (as stubs). Task-number: QTBUG-35041 Change-Id: Ie9511207440fa23645e52643881f5993177a4368 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Don't store the QSGNode pointerAlan Alpert2013-11-222-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QSGNode subtree may be cleared at any time. Get the subtree via the node pointer passed in updatePaintNode, to ensure that the subtree is still valid each update. Some references are still being stored but invalidated when a new subtree is created. QTBUG-34994 has been created to track fixing that. Task-number: QTBUG-33553 Change-Id: I2115aff931d42b613d207553c636be7d80c405bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * TextInput: add editingFinished signalLiang Qi2013-11-223-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 [ChangeLog][QtDeclarative][TextInput] add editingFinished signal Change-Id: Ib633daee67cd4e5f15739a6004adbe882ab3d3fc Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| | * V4 Use getrlimit on Darwin to get the stack size for the main threadAndy Nichols2013-11-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out pthread_get_size does not return the correct size when it is called from the main thread, so to workaround you call getrlimit instead Without this change, most QML applications are broken on iOS. Change-Id: I9a61494de26caa3d7be7e46a991e6d6d0514ce17 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Enforce window rendering in sequence on llvmpipe.Gunnar Sletta2013-11-202-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rendering multiple windows in parallel on llvmpipe we end up with crashes deep inside llvmpipe as multiple threads seem to access unprotected resources. Work around this bug by enforcing that scene graph rendering happens on one window at a time. Task-number: QTCREATORBUG-10666 Change-Id: I2f734e8f653b2a9b4108eb189280ab922581e2c0 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | Fix MSVC-64-warnings about truncation of integers.Friedemann Kleint2013-11-261-3/+4
| | | | | | | | | | | | | | | Change-Id: Ib92ce4b7e42061bb1892957f04cbfc1fcfe43615 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | Fix MSVC-64-warning about shift word size.Friedemann Kleint2013-11-261-1/+1
|/ / | | | | | | | | | | | | | | jsruntime\qv4mm.cpp(301) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?). Change-Id: I6a4ca024d43776e16a323fdb8c35a339b74e6c09 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Also update viewport size when header/footer size changesRobin Burchell2013-11-261-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-24292 Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | QSmoothedAnimation: Don't set property if animation isn't runningRobin Burchell2013-11-251-0/+3
| | | | | | | | | | | | | | | | | | | | This could cause things to get "stuck" in the wrong state under some rather hard to reproduce conditions. Change-Id: Ied23d2bdfcfd0b197f4b28fed9c82ffd64e52ebf Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com> Done-with: Alan Alpert <416365416c@gmail.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Initial support for accelerated property access to QML singletons and enumsSimon Hausmann2013-11-2518-17/+174
| | | | | | | | | | | | | | | | | | With this patch we determine the meta-object of singletons, propagate it into the IR and load them separately using a dedicated run-time function. In addition enums in singletons and QML types are resolved at compile time. Change-Id: I01ce1288391b476d1c9af669cb2987a44c885703 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | IR Cleanup, resolve ID objects through array subscriptsSimon Hausmann2013-11-2517-73/+114
| | | | | | | | | | | | | | | | | | | | | | | | ...instead of a special MEMBER type. This allows removing the type member from V4IR::Member altogether (and thus unshadow from V4IR::Expr::type). By not requiring the base of a id lookup member expression to be a NAME, we can also speed up repeated id lookups by fetching the id object array wrapper only once per function. Change-Id: I3e9b8f498d32ace4a0cc2254f49e02ecc124f79c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Cleanup, get rid of MemberOfQObject V4IR::Member specializationSimon Hausmann2013-11-255-33/+14
| | | | | | | | | | | | | | It is technically redundant to the Member::property field. Change-Id: If0ee35b2c94a2c9373784d36a1f8dfe8ad7dcfb3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Speed up repeated context, scope and import script lookupsSimon Hausmann2013-11-254-9/+36
| | | | | | | | | | | | | | | | | | Instead of querying for the context, scope or imported scripts object on each access, do it once at the beginning of the expression in the IR and re-use the temp. The optimizer will optimize away unused temps. Change-Id: I703e737469030c4454d23c567873012a2b537d71 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Improve type interference for QObject propertiesSimon Hausmann2013-11-2518-112/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate QObject properties in member expressions across temporaries as part of the type interference SSA pass. This replaces the earlier attempt to resolving QObject properties in fieldMemberExpression() in the codegen, but it was incomplete and now things like the following are fully resolved: var tmp = blah.somePropertyThatReturnsAQQuickItem; <-- QQuickItem property return type propagated into tmp var width = tmp.width; <-- and picked up here again to resolve the index of width instead of by name With this patch Temp gets a helper structure with a function pointer, initialized to aid the resolution of properties in Qt meta objects. This structure is propagated into the temps until it reaches the next member expression that uses the temp. Similarly QObjectType is added as IR type, next to VarType. The resolution inside the SSA type interference pass also requires passing through the QQmlEngine from the upper caller levels, in order to resolve the property type to a potential QMetaObject property. Change-Id: I14c98fa455db57603da46613ce49c174d0944291 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix crash on QQmlEngine destruction.Robin Burchell2013-11-252-2/+2
| | | | | | | | | | | | | | | | | | | | QQmlTypeLoader references QQmlImportDatabase in a thread, so change the declaration order so QQmlTypeLoader is destroyed and its thread stopped before QQmlImportDatabase is destroyed. Change-Id: If1f8ef0a5ce56103a417ecfb6897d2c3b9c8d364 Done-with: Andrew den Exter <andrew.den.exter@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>