aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Protect write accesses to objectsLars Knoll2013-10-2918-23/+132
| | | | | | | | Don't write to objects if we have a pending exception to avoid any side effects. Change-Id: I9f93a9195a652dbae7033cc6ebb355d5d86e9b5e Reviewed-by: Simon Hausmann <[email protected]>
* Avoid side effects when en exception has been thrown.Lars Knoll2013-10-2938-295/+518
| | | | | | | | | | | | | | We don't want to check for exceptions after every single line on our runtime methods. A better way to handle this is to add the check in all methods that have direct side effects (as e.g. writing to a property of the JS stack). We also need to return whereever we throw an exception. To simplify the code, ExecutionContext::throwXxx methods now return a ReturnedValue (always undefined) for convenience. Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90 Reviewed-by: Simon Hausmann <[email protected]>
* Correctly catch exceptions in the API methodsLars Knoll2013-10-293-57/+51
| | | | | | | | Replace all C++ try/catch statements with engine->hasException checks. Change-Id: I7c04e02664ec6b4d256478c6e18f6b20ae4f7bc1 Reviewed-by: Simon Hausmann <[email protected]>
* Properly propagate parse errorsLars Knoll2013-10-2913-45/+56
| | | | | | | | Replace all try/catch statements used when parsing with checks for engine->hasException. Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9 Reviewed-by: Simon Hausmann <[email protected]>
* Exit the codegen in case we have thrown a parse errorLars Knoll2013-10-292-75/+334
| | | | | | | | | This makes sure we get the right exception in the engine in case there are multiple parse errors in the code, and avoids running into assertions. Change-Id: I8a11c6d043d09caf57a3e4c6aad5834e99cc1761 Reviewed-by: Simon Hausmann <[email protected]>
* Implement new exception handling for mothLars Knoll2013-10-295-13/+102
| | | | | | | | | Add the required instructions and check for exceptions in the engine before storing any results. Change-Id: Ibfaf904d659859e8012920270825211ba202c63d Reviewed-by: Simon Hausmann <[email protected]>
* Rework IR code generation for try/catch/finallyLars Knoll2013-10-2914-61/+97
| | | | | | | | | | | | | | | | | | Simplify the generated code. Add a special block to catch exceptions thrown inside a catch() statement. store the exception on the stack when entering finally and rethrow it at the end. This ensure correct behavior for break/continue/return statements inside finally. Don't check for exceptions after calling push_catch_scope and pop_scope in the JIT'ed code. This can lead to infinite loops when throwing inside an exception handler. Change-Id: I67e9325794e2fd25b0773b21e02fbaadb43faab0 Change-Id: Ic1ea9c0c43eec1d49177dc1ab4552a1da04e96fe Reviewed-by: Simon Hausmann <[email protected]>
* Rework exception handlingLars Knoll2013-10-2920-397/+246
| | | | | | | | | | | | | | Start the work to remove c++ exceptions from our JS exception handling. Rather rely on engine->hasException. Check the flag after we return from any runtime call in the JIT. Implement new try/catch handling code in qv4codegen and for the JIT that doesn't rely on exceptions. As an added bonus, we can remove the Try statement in the IR. Change-Id: Ic95addd6ae03371c43c47e04cac26afdce23a061 Reviewed-by: Simon Hausmann <[email protected]>
* Disable the stack slot allocatorLars Knoll2013-10-291-1/+1
| | | | | | | | | | | The allocator doesn't work correctly and sometimes assigns temps with overlapping ranges to the same stack slot. This fixes crypto.js and qt quick controls autotests running with the interpreter. Change-Id: If3d0f90edfac669f89da5174cd58eb345d48f2b8 Reviewed-by: Simon Hausmann <[email protected]>
* Fix rendernode bug and enable rendernode test.Gunnar Sletta2013-10-261-3/+2
| | | | | | | | | | | | | | The bug in the renderer was that the viewport was set before we called the render node, leaving us with the viewport set by the render node as opposed to the viewport of the renderer. The render node API is a crude and intrusive hack which was added for webkit back in the day. With the introduction of webengine it becomes less relevant, but it should still work. Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc Reviewed-by: Alan Alpert <[email protected]>
* QtQuick.Dialogs: resolution-independent controls use actual resolutionShawn Rutledge2013-10-263-5/+6
| | | | | | | | logicalPixelDensity ended up hard-coded on Android, which made the buttons and the FileDialog too small again. Change-Id: Ic1805246c4466d7167d422ba48ae5ec37978d332 Reviewed-by: Jens Bache-Wiig <[email protected]>
* Screen attached property: expose pixelDensity propertyShawn Rutledge2013-10-262-0/+21
| | | | | | | | | Because logicalPixelDensity is different than physical density on multiple platforms, having the actual density is critical to be able to design resolution-independent controls. Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2b Reviewed-by: Jens Bache-Wiig <[email protected]>
* Make sure QQuickBorderImage sets its pixmapChanged dirtyflagGunnar Sletta2013-10-251-5/+3
| | | | | | | Task-number: QTBUG-34298 Change-Id: Ie66f0bdd705335491496f5d583193b32cb7749f3 Reviewed-by: Alan Alpert <[email protected]>
* Use finalUrl in QQmlTypeLoader::Blob::addPragma to fix a bug.Antti Piira2013-10-251-3/+3
| | | | | | | | | | There was a bug in addPragma where url() was being used instead of finalUrl(). This resulted in an error finding the type if selectors were used. This patch includes the fix and adds a unit test to cover the use case. Change-Id: I18b6c73e96af2e1464931de76f1f8fd804746d82 Reviewed-by: Simon Hausmann <[email protected]>
* Explicitly mark subdirs as host_builds in SUBDIRS templateTor Arne Vestbø2013-10-251-0/+2
| | | | | | | | | | | Allows post-processing code to exclude recursing into host_build subdirs. The alternative would be to have the SUBDIRS logic pre-parse the subdir project to check if it's a host_build, but that might have a performance impact, so it's better to leave the information explicit in the subdir project file. Change-Id: I468ceeaedce54b13bf672f82b9dcf04cc19d15e1 Reviewed-by: Oswald Buddenhagen <[email protected]>
* simplify host_build logic againOswald Buddenhagen2013-10-251-7/+1
| | | | | | | | | | qt_tool handles bootstrapping fully automatically. This reverts commit 0fc040ef70513ccaeb9e96f7ca05a3df4d6c7879, and adds some more. Change-Id: Icffcf7f487dbf660678c7ee622f94b1063fef7e3 Reviewed-by: Joerg Bornemann <[email protected]>
* Item documentation: visibleChildren is a list of items, not a realShawn Rutledge2013-10-251-1/+1
| | | | | | | | | Followup to I5ec541226fabd72c05ce8ccb8bb7e56f6ec7717a Task-number: QTBUG-22724 Change-Id: I3f74fda29faba4054c5bb97aad4735f7c5f0f278 Reviewed-by: Jerome Pasion <[email protected]> Reviewed-by: J-P Nurmi <[email protected]>
* Clear text node references after sub-tree has been cleaned up.Alan Alpert2013-10-241-0/+3
| | | | | | Task-number: QTBUG-34181 Change-Id: I861e192cee2c683efee79e7404a5c9d70b60691f Reviewed-by: Gunnar Sletta <[email protected]>
* Doc: Fixed broken linksVenu2013-10-243-46/+47
| | | | | | | | | | | | | | | | | There were many links (including the broken) on the Qt Quick index page and QML type reference page using the html file name to link to a page or a section within a page. Using html file reference in a link is not a good approach as qdoc does not give complete control to the author to define the html file name. This change updates all such links to use the page \title and \target names, which are considered to be better ways to link. Task-number:QTBUG-33360 Change-Id: Ibd1b1e3223a7e205bbdcf21b1b7f6e515749c5c9 Reviewed-by: Nico Vertriest <[email protected]> Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Martin Smith <[email protected]> Reviewed-by: Jerome Pasion <[email protected]>
* V4 debugger: retrieve formals and locals.Erik Verbruggen2013-10-249-101/+238
| | | | | Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327 Reviewed-by: Simon Hausmann <[email protected]>
* Allow &quot; in QQuickStyledTextJohn Brooks2013-10-241-0/+2
| | | | | | | | QString::toHtmlEscaped generates &quot;. QQuickStyledText should be symmetrical with that function. Change-Id: I67ea0abe446b5fa1edb53258dca58b84af910e28 Reviewed-by: Martin Jones <[email protected]>
* Doc: Added a QML module page for Qt Quick TestVenu2013-10-233-1/+17
| | | | | | | | | | | | This should avoid the TestCase and SignalSpy types being listed in the All Classes page, which is meant for the C++ classes. Task-number: QTBUG-33316 Change-Id: I0f2f9e557df89f46f656a8820602fe5712c64073 Reviewed-by: Caroline Chao <[email protected]> Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Jerome Pasion <[email protected]>
* Win32: Remove dependency to DbgHelp DLLSimon Hausmann2013-10-231-4/+0
| | | | | | | | This was used for natice stack trace determination, which is done differently now. Change-Id: Id983f2bf6805aaf3f7081a16196268be88c98951 Reviewed-by: Friedemann Kleint <[email protected]>
* Make LocalStorage more verboseGatis Paeglis2013-10-221-1/+3
| | | | | Change-Id: I4f3dd475156941f1a1d2815a4db57ad9abf8f27d Reviewed-by: Alan Alpert <[email protected]>
* Avoid crash when a QML signal is connected to a non-void slotJ-P Nurmi2013-10-221-5/+3
| | | | | | | | | | Don't pass a QVariant pointer for the return value when we're not interested in it and the return type might not even be a QVariant (that would be only true for QML methods). Task-number: QTBUG-32801 Change-Id: I8f14e40d8f94caef7e3d086b776735f0484dbf0e Reviewed-by: Simon Hausmann <[email protected]>
* Remove ancient and unused leftoversGunnar Sletta2013-10-224-70/+9
| | | | | Change-Id: Ia3a2aa2244748c2f3f2df8853f5bddfbbc4bc19f Reviewed-by: Robin Burchell <[email protected]>
* Add support CompositeSingleton to the new V4 compiler.v5.2.0-beta1Antti Piira2013-10-217-6/+95
| | | | | | | | | | | | | | | | | Implements QQmlCodeGenerator::visit(AST::UiPragma *) to process any pragma statements in a QML file for the new V4 compiler approach. Only pragma Singleton is supported, others will generate errors. Also adds necessary hooks to treat types as Singletons. Basic functionality is working, but three of the QML Singleton unit tests fail. Some of them are dependent on other language capabilities that seem to have problems. In addition removes unnecessary toString() call in the equivalent visit(AST::UiPragma *) function of the old parser. Change-Id: Iec9fa887f953b80b7f9a11878d846637a8f519ef Reviewed-by: Simon Hausmann <[email protected]>
* Don't use reserved keyword "texture" as uniform variable nameSean Harmer2013-10-216-73/+73
| | | | | | | | | | The "texture" keyword is a function name in OpenGL core profile. This commit is in preparation for making the Qt Quick 2 renderer and materials work with a core profile context. Change-Id: Iad243e64ab8db739fc46b85bb626bdb8b9ceb208 Reviewed-by: James Turner <[email protected]> Reviewed-by: Gunnar Sletta <[email protected]>
* Fix MSVC2013 compilationYuchen Deng2013-10-212-0/+4
| | | | | | Change-Id: I79b50e786f46c9a15963f09158c18871c95fe093 Reviewed-by: Peter Kümmel <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* Revert commit d818575966e2e2000fe2b7ee390c620f595d9825Simon Hausmann2013-10-213-17/+0
| | | | | | | | | | | | This reverts the commit that deprecated the with statement and added a note to the docs that binding expressions will be compiled in strict mode in Qt 5.2. It turns out that we had to keep the with statement and enabling strict mode breaks just too much unfortunately. Change-Id: Id38c27f684fbfcb6b6b848be8f691658089d1adb Reviewed-by: Lars Knoll <[email protected]>
* Prevent badly formed texture nodes in the scene graph.Gunnar Sletta2013-10-214-10/+10
| | | | | | | | | | | | | | | | | A texture based node without a valid texture is not allowed, as the material and the renderer will only tolerate well-formed nodes. If a node is missing any part of its material state it should not be in the scene graph in the first place. Because of an "optimization" in QSGDefaultImageNode::setTexture and QSGSimpleTextureNode::setTexture, we must temporarily set the texture to 0 to ensure that it gets updated properly. This temporarily puts the node into an invalid state which can lead to crashes when QSGNode::markDirty() reaches the renderer. Task-number: QTBUG-34062 Change-Id: Ic1735c9b974b90b3684262de9589133c961bac6e Reviewed-by: Laszlo Agocs <[email protected]>
* Reset on model layout changedAlbert Astals Cid2013-10-211-2/+1
| | | | | | | Otherwise the next dataChanged from the model may not be received Change-Id: I16b859d92fdb1823c4a56c297d4451abe438fbb1 Reviewed-by: Stephen Kelly <[email protected]>
* Qml JavaScript code generation cleanupsSimon Hausmann2013-10-208-91/+75
| | | | | | | | | | | | | | | * Run the binding expressions, functions and signal handlers through the V4 codegen _per_ component, and run the isel at the end for the entire file. We need to do per-component codegen because we want to set up the correct id and object scopes, which are different for the root component and anonymous components. * Changed V4IR::Module to allow for the concept of "qml modules" where there is no root function defined. This is a logical consequence of running v4 codegen multiple times with different input but the same V4IR::Module. Change-Id: Ib3a719f83507cbab7c2e4e145ccad5b663c795cf Reviewed-by: Lars Knoll <[email protected]>
* Cleanup: Avoid unnecessary irModule->functions.indexOf callsSimon Hausmann2013-10-207-50/+58
| | | | | | | | | With a growing number of functions per module, these calls become expensive and are unnecessary. defineFunction in the code generator can simply return the correct index right away. Change-Id: I8ab56a3083bf215674a1b46c502b415be694e465 Reviewed-by: Lars Knoll <[email protected]>
* Remove internal method from public APILars Knoll2013-10-1911-39/+36
| | | | | | | | QQmlError is public API and shouldn't expose an internal method. Change-Id: I7caf06af9340fefec5c96103395fe74acbf19497 Reviewed-by: Simon Hausmann <[email protected]>
* Some minor optimizationsLars Knoll2013-10-194-42/+38
| | | | | Change-Id: Ib2e08e7c89ca59a48f8fd52b30981e5d7e60803b Reviewed-by: Simon Hausmann <[email protected]>
* QtQuick.Dialogs: deploy qml files only for debug buildsShawn Rutledge2013-10-171-2/+5
| | | | | | | | | | QML_FILES are installed with the qml plugin they belong to. This is helpful for debugging, but redundant because the same QML is also packaged as resources (after 8780af05b1bc63aa71c3a318972465ffdb830070). Task-number: QTBUG-31565 Change-Id: I0b277b62b48e0a742f3ef2ff6ee2a81cc071295e Reviewed-by: Caroline Chao <[email protected]>
* Fix ARM thumb2 mode detectionSimon Hausmann2013-10-171-1/+5
| | | | | | | | | __TARGET_ARCH_THUMB may not always be defined, but __thumb2__ for example is also a good indicator that we can generated and run thumb2 code and thus enable the JIT. Change-Id: I987d0af5883d9bb844c4c99a0691a12aedc94ff5 Reviewed-by: Lars Knoll <[email protected]>
* Fix crash in FolderListModelFabian Bumberger2013-10-171-3/+5
| | | | | | Change-Id: I8d012e9a356676dd3dad246579c7339eaddc1e91 Reviewed-by: Alan Alpert <[email protected]> Reviewed-by: Alex Blasche <[email protected]>
* Make sure v8 service sends a finished signalKai Koehne2013-10-171-0/+2
| | | | | | | Otherwise Qt Creator will block forever ... Change-Id: I2ffe5e826c10338aeb4ded7079154fe83710c108 Reviewed-by: Simon Hausmann <[email protected]>
* Disable WTF assertions in release buildsSimon Hausmann2013-10-171-0/+2
| | | | | | | Define NDEBUG to disable them. Change-Id: Ie1f08863b9b483216be2c0768b505f2e9e7ccef8 Reviewed-by: Lars Knoll <[email protected]>
* Fix build on ARM in ARM mode (instead of thumb2)Simon Hausmann2013-10-177-34/+54
| | | | | | | | | | We don't support the traditional ARM assembler (yet), only JIT on thumb2. In order for us to reliably check that, we have to wait until the pre-processor runs, which this patch achieves by moving all JIT enable/disable decisions into qv4global_p.h Change-Id: I7eff5b4fbf1cd26297a08dee16984ad867358113 Reviewed-by: Lars Knoll <[email protected]>
* Implement WTFReportAssertionFailureSimon Hausmann2013-10-171-1/+2
| | | | | | | At least do a printf with the failure details, to make debugging easier. Change-Id: I092d31e3408cd0a651c6dd96b5fd94adf4abe3a7 Reviewed-by: Lars Knoll <[email protected]>
* Fix ASSERT_VALID_CODE_POINTER for our ARM buildsSimon Hausmann2013-10-171-4/+2
| | | | | | | | | | | We want to allow intermixing thumb and ARM for all builds, not only Android. Modified the macro to do a thumb-compatible null pointer check. This also works around a miscompilation on QNX where the compiler appeared to make incorrect assumptions about the address of functions we are taking. Change-Id: Ib8fc400178e0c2621bde2ca94b3f94041591e19a Reviewed-by: Lars Knoll <[email protected]>
* V4 ARM: extend disassembler.Erik Verbruggen2013-10-172-0/+77
| | | | | | | Added VADD/VSUB/VLDR/VSTR. Change-Id: I25fbb338652c3457e15cc9ef17209d35c63fefe5 Reviewed-by: Lars Knoll <[email protected]>
* Fix performance regression when doing property lookups for non-existant ↵Simon Hausmann2013-10-163-6/+14
| | | | | | | | | | | | | | | | | properties Commit 84627464eb11ca1149d46946b12e3c82eb54a8bf introduced a performance regression of falling back to reading the QMetaObject, when the lookup for a property in QML failed, after we've tried in the property cache. This is very very expensive to do and was only due to QQmlPropertyMap not correctly invalidating the property cache. Instead remove the property cache from the property map's QObject and on the lookup side rely on the property cache being correct in the result (positive or negative). Change-Id: I8a013483203f2007d48b71feafa10b3ea02c53fd Reviewed-by: Lars Knoll <[email protected]>
* Speed up exception propagationSimon Hausmann2013-10-1610-163/+136
| | | | | | | | | | Avoid catch (...) with re-throw as it turns that this is very slow because it throws a new exception and the unwinder starts from scratch. Instead use stack allocated objects and cleaning destructors to restore state before continuing with the propagation of exceptions. Change-Id: I6d95026bcd60b58cb6258a9dae28623a46739532 Reviewed-by: Lars Knoll <[email protected]>
* Speed up stack trace generation for the JITSimon Hausmann2013-10-168-272/+38
| | | | | | | | | | | | | | It turns out that in QML it is not unusual that during early binding evaluations due to the undefined order, the evaluation tries to look up properties in objects that aren't initialized yet and thus exceptions are thrown. Eeach thrown exception saves a stack trace, which is expensive to generate when using the JIT, as it does full stack unwinding. This patch implements a more light-weight approach by storing the instruction pointer in the context before leaving JIT generated code. Change-Id: I95e1cfd01179247dfc2c1df949828f474a23161b Reviewed-by: Lars Knoll <[email protected]>
* Avoid infinite loop with distance fields disabledLaszlo Agocs2013-10-161-1/+5
| | | | | | | | createGlyphNode() and createNativeGlyphNode() kept calling each other on GLES whenever QML_DISABLE_DISTANCEFIELD was set. Change-Id: Ic1c2cfe0c4c7301f82cbbcce1cb512bd515b52ef Reviewed-by: Gunnar Sletta <[email protected]>
* Dialogs: use resources for QML and imagesShawn Rutledge2013-10-162-15/+64
| | | | | | | | | | | | | | | | All the qml and image files are embedded in the QtQuick.Dialogs plugin. If DefaultFileDialog.qml is missing from the installation directory, loading from resources will be enabled. Otherwise, the files will be loaded from the local path. This is analogous to change b2e5d1acb1aca93157a6d4d0a026153134f9ad01 in Qt Quick Controls: it reduces the number of files that need to be installed, but also preserves ease of debugging whenever the QML files are separately installed. Task-number: QTBUG-31565 Change-Id: Idbe6be5d818eb6a25367f2053ea52bc7ac1485bc Reviewed-by: Caroline Chao <[email protected]>