aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Protect list of client plugins from concurrent accessUlf Hermann2014-02-071-41/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the list of client plugins in the QQmlDebugServer could be accessed concurrently from receiveMessage() and addService() either when in non-blocking mode, or if the client uses service discovery or sends additional hello messages after the first one. Change-Id: I946243957184210d40ebca728143714c341b1226 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | V4: stack slot allocator for the interpreter.Erik Verbruggen2014-02-074-15/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the life-time intervals to track which temps go out of scope, in order to re-use the stack-slots they occupied. This reduces the memory consumption on the JavaScript stack and allows for deeper call stacks. For the ECMA tests, this reduces the number of slots needed for the main/entry function from more than 650 to about 10 (depending on the test). Change-Id: Iff4044f5ff7f25e1f88ff1a04f4e80dd99a67590 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | V4: fix life range for phi node target that is never used.Erik Verbruggen2014-02-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | When a temp is defined by a phi-node, but never used, still insert the (very short) life range. Change-Id: Ia976f496736a1606108fab7597c5d90048d9d55a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Remove add/sub/mul instruction specializations for numbersLars Knoll2014-02-073-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These instructions did hurt more than help, as they converted ints to doubles. Since the regular add/sub/mul runtime methods have fast paths for both ints and doubles, we're better off using those instead. Change-Id: I0b7a6f95818943bfc8a0669c1c56f7db4e7246e0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Specialize CJump into JumpEq and JumpNeLars Knoll2014-02-073-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | This avoids the bool invert in the instruction stream, and some additional code in the VME. Change-Id: I0ea675a2e3d07c1b8c5234b888d8d9683bcee330 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Avoid some unary plus instructionsLars Knoll2014-02-071-1/+1
| | | | | | | | | | | | | | | Change-Id: Ie01ef2be8beb890b1ca56bbdc990ccea87c1d91e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove a memset that is not requiredLars Knoll2014-02-071-0/+2
| | | | | | | | | | | | | | | | | | | | | Keep it in debug builds to ease debugging. Change-Id: I334872d3c0ef30b5f09fb5febfc2129a3b450bca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Add specialized instructions for right and left shiftLars Knoll2014-02-073-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | These give a measurable speedup as the critical code paths are now inline. Change-Id: I3cee8a432fbe96d66ba1e6bd277a38e624a50c14 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Simplify some runtime methodsLars Knoll2014-02-071-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | This gives as performant but simpler code, as the first line in toInt() checks if the value is integercompatible. Change-Id: I15d0ade231719116ca1c6c03a86106b7f5aaa9aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove two unused parameters from VME::run()Lars Knoll2014-02-072-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | These parameters are not used outside the function itself anymore, so we can safely remove them. Change-Id: I1694481c05a9927fc78a59ffb7fec43a88e85ac8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Add a MoveConst instruction to the interpreterLars Knoll2014-02-073-14/+39
| | | | | | | | | | | | | | | | | | | | | This simplifies and speeds up loading of constants Change-Id: I05b4f7a34abd4ed6416fa800a31debbb28b37104 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Make the Ref classes not template basedLars Knoll2014-02-0722-140/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to a class hierarchy that mirrors the main classes. This will allow moving functionality over into the Ref classes, as the current Managed classes become mainly something that holds the data. This is required to make objects movable by the GC. Change-Id: I4ca88ab0e5d8c88c8dc56d51937990500a33e0d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Rename Referenced to ManagedRefLars Knoll2014-02-0713-72/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step of removing the templates here and turning this into a class hierarchy. This is required, so we can move all member methods into the Ref classes and make objects movable during GC. Change-Id: Ie14af07fd3e72a7d84a528d0042189ff12ba21bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Move Referenced together with ManagedLars Knoll2014-02-072-81/+90
| | | | | | | | | | | | | | | | | | | | | | | | The two classes belong logically together (as the Managed base type and a generic pointer to a Managed object). Change-Id: I65691669a7169a4514cadf7ab3e744c090851c6b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Accessibility: respect password stateFrederik Gladhorn2014-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | | Better don't leak passwords via accessibility Change-Id: Ibdb0f63101dbd71f51de6f1b8ddaceb359f01e30 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | | Android: Fix crash when using images in QMLEskil Abrahamsen Blomfeldt2014-02-072-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because qtdeclarative was merged back from stable and qtbase is still lagging behind, they have become unsynchronized, causing crashes when trying to get the device name from the platform plugin and failing. To work around this until the merge goes through, I've added a simple guard. Task-number: QTBUG-36658 Change-Id: Ibc399ed325a1fbdeccad85ed8d4841edb7b2ba5d Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Fix memory management issue with accessorsSimon Hausmann2014-02-074-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The earlier pattern of Property p; p.setSetter(new (mm) setterFunction); p.setGetter(new (mm) getterFunction); carries the risk of the second allocation garbage collecting the first one. Consequently we need to put these values onto the JS stack, using a simple ScopedProperty wrapper. Change-Id: Ib29ea3b1eab95595dd6dfbb86fea282d23e3d899 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix crash in qml delegate modelSimon Hausmann2014-02-051-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | qmlContext(this) is expected in re-implementations of classBegin(), so just like the VME we have to be careful that we call it after setting the context on the ddata. Change-Id: I38ad8d1a4e4093368f62f9d57718de3b8cd0cfd2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix propagation of imported scripts for anonymous componentsSimon Hausmann2014-02-054-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | We must take the imported scripts from the creation context. Fixes various errors in Qt Quick Controls. Change-Id: I336d8ffa0537cefd4eeac15f98bbf1b0a5c784af Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Prevent concurrent access to v4 debuggerUlf Hermann2014-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this new engines can be added to the QV4DebugService while breakpoints are set from the debugger thread. In rare cases this leads to a situation where the DebuggerAgent::addDebugger() doesn't see the new breakpoint and DebuggerAgent::addBreakPoint() doesn't see the new debugger. Thus the breakpoint will never be set. This effect is easily reproducible by repeatedly (about 100 times) running the setBreakpointInScriptOnTimerCallback autotest. Change-Id: I5da27478bf579ab24f81aebabbdd321f38fae3f4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Unify the interface for QQmlDebugServicesUlf Hermann2014-02-0511-22/+73
| | | | | | | | | | | | | | | | | | | | | | | | Let the debug server handle adding and removing of engines through defined interfaces to prepare for multi-engine profiling and debugging. Change-Id: I7b277e54bdcce1d3e95e723f041a7db6b08b29fc Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | Move PersistenValue and WeakValue into it's own fileLars Knoll2014-02-057-324/+427
| | | | | | | | | | | | | | | | | | | | | | | | They deserve having their own set of files, and it helps reduce dependencies. Change-Id: Ifd4394f88ef51cbccc61bf92dd20636f570141d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Smaller performance fixesLars Knoll2014-02-053-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move commonly used variables in the ExecutionEngine to the beginning of the struct to increase cache locality. Keep the engine pointer in a register in the interpreter to save one memory load per instruction. Change-Id: If2540c66b62685701511f410aff495c0a20ca694 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove an unused constructorLars Knoll2014-02-052-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fortunately we don't use this constructor anymore. This also allows us to fix the assert in qv4managed. Now we finally enforce that every managed object must have an internal class and a vtable. Change-Id: Idf9081c20633b44b79970fec4cc4d1ec5e6a6f7c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Add a special Debug instruction to the interpreter and use itLars Knoll2014-02-054-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoid having to check for the debugger at every instruction we execute. Instead we only add debug instructions at the beginning of every line and every basic block when we have a debugger. This still allows interrupting the JS execution at any time (as we can't loop inside a basic block), and single stepping through lines. But it has no overhead when the debugger is not running and a lot less when it is running. Change-Id: Ib17170b42944b608fc6caa1891082205dd2b2763 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | [new compiler] Fix logic error in enum resolverSimon Hausmann2014-02-051-1/+1
| | | | | | | | | | | | | | | Change-Id: I614cc1428439801ed20cdee099cf8260ff930618 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | | [new compiler] Fix partial bindings on value typesSimon Hausmann2014-02-041-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can have a binding like this: property point blah: Qt.point(someX, someY); and later you can have bindings on blah.x: { someExpression } In that case we need to clear the binding on blah. Change-Id: I27bfa6ab0f104bf989803c5910e6094767429c03 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix order of alias vs non-alias bindingsSimon Hausmann2014-02-044-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | qqmlecmascript's alias binding tests expect bindings on non-aliases to be bound before bindings on aliases, as the latter may override parts of the former. Change-Id: I23d25c2b7a449f0ed4672ef6865c4a7ef0ed0129 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix bindings on aliasesSimon Hausmann2014-02-041-1/+11
| | | | | | | | | | | | | | | | | | | | | When installing bindings on aliases, make sure to follow the alias. Change-Id: I860a5bf6b5aba838727385f26e50e3d1bf0c8ea8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Set the rootObjectInCreation flag correctly on the root objectSimon Hausmann2014-02-042-5/+13
| | | | | | | | | | | | | | | Change-Id: Iaf96dabb1b3de81aae75953fd261dfc3b562169c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix JS ownership of QML created objectsSimon Hausmann2014-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's allowed to call destroy() on them, so allow for destruction unless the constructor set ownership upfront. Change-Id: I3887c5ab1bb6de7de3b0c7b14f4791d4ed1e0979 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix binding initialization orderSimon Hausmann2014-02-044-9/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3d958cec8d53094a1bbab895377e451b07716e1f (loong time ago!) property bindings are stored in a linked list and newly encounted bindings at parse time are prepended to the list, causing the binding processing to happen in reverse order. There are however exception to the rule. For example list bindings are processed in declaration order and assignments to the default property are sorted by location in the file. In addition various tests rely on value properties being installed first, then followed by signal handlers and group/attached properties. Change-Id: I3bcae29faec5b2420fbba362cd81b8ba960ed19f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Cleanup empty string handlingSimon Hausmann2014-02-044-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the empty string always has index 0, that simplifies the code in a few places and makes it easier to check for the empty string in other places where there's no access to the string pool itself. Change-Id: Icd204aec478e8350ef3fee75d89bda1f88cffe26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix occasional crashes in canvas getImageData and other placesSimon Hausmann2014-02-044-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places we allocate custom array objects and in the constructor we call setArrayType, which will allocate the array's data through the GC. In all of these cases we need to make sure that the array object itself is protected from garbage collection, because while in the constructor it may not be yet in the scope the callee has usually set up. Change-Id: I96b7af4ae00fd809067e12bacd6563984c5e9240 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | Support batching of rotated antialiased elements.Gunnar Sletta2014-02-041-6/+4
| | | | | | | | | | | | | | | | | | Change-Id: I67d961f23941ba5cfa16fd679b609cd0fc3071c7 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Normalize signal & slot signatures in connectionThiago Macieira2014-02-033-6/+6
| | | | | | | | | | | | | | | | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I58132e11ab5fc942b04925c3bcc919165784a5d1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Add missing export macro to QQuickTransformSimon Hausmann2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-34736 Change-Id: Ic0ab7317c76417e6556bc0b26cad50416ba06e54 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Fix nasty bug in property cache leading to inaccessible signal parametersSimon Hausmann2014-02-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The property cache among other things caches the parameter types and names of signals (instead of retrieving them from the meta-object each time). When this cache is created through createArgumentsObject(), the parameter names have to be provided, but the signature didn't enforce that because of the parameter names having a default value of an empty list. All call sites however provided the correct list, except for one in QQmlPropertyCache::methodParameterTypes. Consequently tst_qqmlecmascript::threadSignal() would fail occasionally because the first time this cache was "created" was when the "done" signal was emitted, which caused QQmlBoundSignalExpression::evaluate to call methodParameterTypes. If the signal data had not been cached so far, a new cache with an empty parameter name list was created. Later (in the second half of the test) a new signal handler was compiled and the property cache reported that the signal took no parameters. Change-Id: I19230d0fb1ddd54992f3d6251f82c489626662e7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Propagate JS code gen errorsSimon Hausmann2014-02-031-0/+5
| | | | | | | | | | | | | | | Change-Id: I3b99f3fc762df7ac820b26597bf809a80849b5ce Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix error reporting for invalid regexp property assignmentsSimon Hausmann2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | After recordError makes sure to return false to indicate the error condition to the caller. Change-Id: I7edcda9ea4c6898f1607824085b150dbe295aeb2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix context sharing for imported JS files that have no import ↵Simon Hausmann2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | themselves They should share the imports from the importing context, which means context->importedScripts needs to be initialized before calling scriptValueForContext, because it accesses it. Change-Id: Ifed22555028e03d597954ba1a18e546bfb901c58 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix sanity checking of parameter names when connecting to C++ ↵Simon Hausmann2014-02-032-2/+17
| | | | | | | | | | | | | | | | | | | | | signals Change-Id: Ie2dc8689786a61fe5f38a0f91ff86f011e965b2d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix revisioningSimon Hausmann2014-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Always install the property cache on the ddata, not only for types with a VME meta object, as the cache has the correct revision cache. Change-Id: I82352df867c1045b37152013eb924aafde2ee874 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Allow function calls during initial binding evaluations and ↵Simon Hausmann2014-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | signal handlers Functions need to be setup first, like in the VME. Change-Id: I4d1cffa04cb2b3ba7027c3720d55133253a1bad7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix error message about final property overridesSimon Hausmann2014-02-031-3/+4
| | | | | | | | | | | | | | | Change-Id: Icb8c2dfc633a6c322d4448ce18e3c01e0311b0f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix error messages when trying to create invalid property ↵Simon Hausmann2014-02-032-4/+33
| | | | | | | | | | | | | | | | | | | | | interceptors Change-Id: I3dd608bfceb04323f92503596b87bbcb4bf582fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix error message when assigning lists to singular propertiesSimon Hausmann2014-02-034-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Also adjust the error message for the other compiler when trying to assign lists to script strings. Change-Id: I50f833c340f3634a59c5b36f30aeafc53003e65e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Don't allow setting the id property multiple timesSimon Hausmann2014-02-032-4/+7
| | | | | | | | | | | | | | | Change-Id: Ic7f1938dd048db6c6975d78ad4f69d3c646cece5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] Fix error messages for binding vs. property declarationsSimon Hausmann2014-02-033-54/+76
| | | | | | | | | | | | | | | | | | | | | | | | Separate binding errors from property declaration errors - they were accidentally mixed up. Change-Id: Id2d5134dc98ee3e1d7ce0c3d356f165e144e0d82 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | [new compiler] CleanupsSimon Hausmann2014-02-033-123/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating the initial object tree from the AST, encapsulate the declarations and bindings in the QmlObject class, in order to centralize the redirection via declarationsOverride as well as the error handling. This also replaces the hashes to detect duplicate properties/signals from being QString based to simply use the existing string indices from the compilation unit. Change-Id: Ia6ceae56977a98b5c5a7a738bf983a731e608d46 Reviewed-by: Lars Knoll <lars.knoll@digia.com>