aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v4
Commit message (Collapse)AuthorAgeFilesLines
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2413-7448/+0
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce memory by not calling QUrl::toString() multiple timesAaron Kennedy2012-02-201-1/+1
| | | | | Change-Id: I57ce25f4e20cac048ff507a8c195b83adc30040d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Don't store object and property in QDeclarativeAbstractBindingAaron Kennedy2012-02-202-0/+12
| | | | | Change-Id: Ia164655f6329ec80dc466a1a3a5613a73e1c23ac Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Set the type for unary expressions in v4.Michael Brasser2012-02-161-1/+1
| | | | | | | | | Previously unary expressions were being discarded because the type was not set. Also add tests verifying the results. Change-Id: Icbb493fbb6f036e59c8a4a1fe232c118312a63a5 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Debugger: Rename QDeclarativeDebugTrace to QDeclarativeProfilerServiceKai Koehne2012-02-101-1/+1
| | | | | | | | This avoids naming confusion with QDeclarativeTrace + makes it in line with QV8ProfilerService. Change-Id: Ifd801655044cff3ffdb2a9695ffc9868eeb51663 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Ensure || expressions in v4 will always exit.Michael Brasser2012-02-031-0/+1
| | | | | | Change-Id: I7188e38403fec96f83f3bdfc68b763a9aec9346a Task-number: QTBUG-24038 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-036-53/+5
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QmlProfiler: profiling binding loopsChristiaan Janssen2012-02-011-2/+2
| | | | | | | | Moved the trace call in bindings so that they are also registered when binding loops occur. Change-Id: I56aa7bda6c5305f14dee98bebd929fb720f1ab32 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QmlProfiler: moved v4 tracing to run methodChristiaan Janssen2012-02-011-5/+2
| | | | | | | | We used to register the calls to update, but that happens only when the binding is created. Evaluation occurs at run. Change-Id: I01927a1eb515a83b4e5c69c6fcf5f358a8e5878f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QmlProfiler: profiling compiled v8 bindingsChristiaan Janssen2012-02-011-4/+4
| | | | | Change-Id: I8c61b3805244595de6e1c7fbed7ed23440fe0a82 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3012-12/+12
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-2312-12/+12
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add QJSValue::toInt() and toUInt()Kent Hansen2012-01-201-1/+1
| | | | | | | | | | These replace toInt32() and toUInt32(), which are obsolete and will be removed. Task-number: QTBUG-23604 Change-Id: I83c055dbbe399fa7242889cee8a177440a693d9a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Allow QML URLs to contain pre-encoded octetsMatthew Vogt2012-01-181-4/+8
| | | | | | | | | Use QUrl Tolerant parsing mode to permit user-supplied URLs to contain pre-encoded octets which are not mangled by string conversion. Task-number: QTBUG-22756 Change-Id: I4b160b04340b95221d1eb3336bda8c0b38d2e232 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QDeclarativeExpression: storing column number in expression locationChristiaan Janssen2012-01-161-1/+1
| | | | | Change-Id: I2d69738158abfc76f80b1cfc0e0ccb145fda2245 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0512-12/+12
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix IR code generation for member expressionsRoberto Raggi2011-12-151-13/+15
| | | | | | | | | The generated code for member expressions (e.g. parent.width) was using a wrong mix of types from the base object and names from the current member expression. Change-Id: I167df285ae44f9dc1538e2b1019998f02a0479a8 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add support for QUrl types to V4Roberto Raggi2011-12-155-12/+169
| | | | | | | | | | | | | Extended the V4 instruction set with instructions to `fast convert' url registers to string and bool registers and `resolve' urls using QDeclarativeContext::resolvedUrl. Also, made IR::UrlType a special `string' type. It's a little trick to ensure that the compiler will generate correct conversions for the binary expressions. Change-Id: Ibc9e5b99302bd513f0cc52b598a1b198b11d4d30 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add a tracing API for the QML engineAaron Kennedy2011-12-142-3/+15
| | | | | Change-Id: Ic03583444d586f275897d765be8e1b5e69fdd5d4 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Introduce methods to get the source location of the AST nodes.Roberto Raggi2011-12-062-21/+0
| | | | | | | | | Also removed deprecate AST nodes. Change-Id: I9221e81b15b18530bb2ab8b09da2482df543bace Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Introduce more generic fast property handlingAaron Kennedy2011-12-054-8/+22
| | | | | | | Also reduce the number of direct calls to qt_metacall(). Change-Id: I04cd6e516a3e61058548309a19fe0b830f15c93f Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* v4: Get rid of dependency on QQuickAnchorLine typeKent Hansen2011-11-233-13/+9
| | | | | | | | | | | | | Delegate the meta-type id query and value comparison to QDeclarativeMetaType. Register a comparison function for QQuickAnchorLine in QQuickItemsModule, so that not even QDeclarativeMetaType needs to know the type declaration. (This is needed in order to be able to move the items to a separate library.) Change-Id: I6404d01b74143946ae0a79fa18d1777b675e4194 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Don't disconnect mid binding evaluationAaron Kennedy2011-11-221-0/+2
| | | | | | Task-number: QTBUG-22816 Change-Id: I7a958203945a051322228b6fade9e1d49d5f4c4a Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Profiler: Preserve line information also for optimized bindingsKai Koehne2011-11-222-2/+7
| | | | | Change-Id: Ibd5abb42364711fab454e6b9c13af53462730471 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix MSVC warning about struct vs class declarationKai Koehne2011-11-211-1/+1
| | | | | | | Change-Id: I00dc08c746b30f6d49b831989ae1d0d798b430a5 warning: C4099: 'QMetaObject' : type name first seen using 'struct' now seen using 'class' warning: C4099: 'QV4Program' : type name first seen using 'class' now seen using 'struct'` Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use the property cache when compiling the V4 instructions.Roberto Raggi2011-11-144-30/+28
| | | | | Change-Id: Ifca6166328e7c20707fef153fa2b960da3a00a98 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix v4 crash when accessing invalid attached propertyAaron Kennedy2011-11-091-1/+2
| | | | | | Task-number: QTBUG-21883 Change-Id: Ic14a5d494890fc1bc322c660b97f657d640f2ff8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Declarative: Fix compiler warnings.Friedemann Kleint2011-11-071-2/+2
| | | | | | | | - Unused parameters, variables - Usage of deprecated QAtomic::operator=(int) Change-Id: I2861968dac8ef8a3126783e3447c593808116871 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Skip the captured properties step in bindingsAaron Kennedy2011-11-042-1/+8
| | | | | | | | | | Objects and notifiers in the capturedProperties list were not guarded which can lead to crashes if they're deleted prior to the binding completing. Now the notifiers are connected to and guarded immediately to prevent this. Change-Id: I912e323c52bf6169fb5077e552d5d38d9aa7faec Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Declarative: Fix gcc 4.6 warnings about assigned/unused variables.Friedemann Kleint2011-11-011-1/+0
| | | | | | Change-Id: Iac4bb4a6b1aa4071a239bb25f25f01b71e36868b Reviewed-by: Alexis Menard <alexis.menard@openbossa.org> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Rename QDeclarativePropertyCache::Data to QDeclarativePropertyDataAaron Kennedy2011-10-261-5/+5
| | | | | | | This class is now too large to be nicely nested. Change-Id: I32cfa5caa524b8bf447d1f8c53ef2763f60bdac1 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Rename Qt Quick-specific classes to QQuick*Kent Hansen2011-10-213-11/+11
| | | | | | | | | | | | | | | | | | | | | | The QSG (SceneGraph) prefix is too generic for Qt Quick(2)-specific classes. All the classes and files in the declarative/items directory have been renamed. In particular, for classes that are currently public, the renaming is as follows: QSGView --> QQuickView QSGCanvas --> QQuickCanvas QSGItem --> QQuickItem QSGPaintedItem --> QQuickPaintedItem The header files have been renamed accordingly (e.g. qsgview.h --> qquickview.h). Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Declarative: Fix MSVC and g++ warningsFriedemann Kleint2011-10-191-1/+2
| | | | | | | | | | | | | | | | | Potentially severe: - Fix int/bool mismatches - Use of uninitialized variable - Do connectionMask shift operations in 64bit - Enum type mismatch for QLineControl::EchoMode Various: - class/struct mismatches - UnhandledEnumeration values - Unused variables - Constructor initialization order Change-Id: Ieb52f8990445fe95f94070175a0f9beb66863240 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Clean up declarative includesKent Hansen2011-10-173-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This commit is in preparation of moving several files to a separate library (QtQuick2).) Don't add all subfolders to the includepath (from the .pri files). There's no good reason to do that. For headers (both public and private) that are in the same folder as the file that includes them, prefer to use #include "foo.h" #include "bar_p.h" For public headers that are outside the current folder but have "unambiguous" names (e.g. qdeclarative prefix), use #include <foo.h> For private headers that are outside the current folder, use #include <private/baz_p.h> Also change #include <QtDeclarative/private/foo_p.h> to #include <private/foo_p.h> The header filenames already have a qdeclarative or qsg prefix; there's no need to prefix by module name to disambiguate. Finally, #include "private/foo_p.h" should be avoided. private/ is used for auto-generated (forwarding) headers, which never reside in the current (source) directory. Use angle brackets instead. Change-Id: I04f8477fdba043546064ee276475c09dc373f8f2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Rename QDeclarativeV4 -> QV4Aaron Kennedy2011-10-1213-256/+256
| | | | | | | Change-Id: Ic35e0ad1663cafe4aa535594dc3999a2d317ce0e Reviewed-on: http://codereview.qt-project.org/6301 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Sanity-Review: Aaron Kennedy <aaron.kennedy@nokia.com>
* Optimize signal handlingAaron Kennedy2011-10-122-157/+119
| | | | | | | | | | | | | | | Bindings connect to lots of signals that are never emitted. By managing signal connection lists ourselves, we can do a much better job than Qt's generic signal/slot connection logic. Also, by connecting to QDeclarativeNotifierEndpoint's rather than QObject slots, we can eliminate the need to instantiate a QObject for the V4 and V8 binding managers. Change-Id: I598667deaefdbd2860227bd74378a1b196761686 Reviewed-on: http://codereview.qt-project.org/6278 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Sanity-Review: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix compile of the non-threaded V4 interpreter.Roberto Raggi2011-09-292-2/+2
| | | | | | | | Change-Id: I263e9826c513f8edaaf510ff1206b588dfe92f7b Reviewed-on: http://codereview.qt-project.org/5725 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Asynchronous component instantiationAaron Kennedy2011-09-291-3/+5
| | | | | | | | | | | | | This introduces two main: * the QML compiler executes in a separate thread * item instantiation can be interrupted and resumed to allow it to be split across multiple frames. Task-number: QTBUG-21151 Change-Id: I9631c62bb77da3a2e0c37f0da3719533fdce4fef Reviewed-on: http://codereview.qt-project.org/5676 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Get rid of redundant type member from V4 instructionsKent Hansen2011-09-235-665/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interpretation is threaded, the type member is redundant, since we can obtain the type from the instruction address. Getting rid of the type member can save at least one byte per instruction (possibly more because of alignment). On ia32, the Noop and Block instructions become 4 bytes smaller. The compiler has been refactored to leave it up to the Bytecode class to decide whether the instruction address or type (enum) should be stored. To achieve this, the "low-level" Instr union was renamed to V4Instr, and the new Instr struct used by the compiler provides typedefs for instantiating the data used by each particular instruction. Lastly, the gen() function (instruction emitter) was made template-based to provide the instruction type. The instructions Bool, Int, Real, String were renamed to Load{Bool,Int,Real,String} to make the new code more readable. This approach follows a similar refactoring in the QML-VME interpreter. Change-Id: I9bf16b099a85afdfb719a25fb18047408882d61e Reviewed-on: http://codereview.qt-project.org/5393 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Get rid of QDeclarativeUtilsKent Hansen2011-09-191-2/+1
| | | | | | | | | | | All the QChar methods needed by QtDeclarative have now been optimized to achieve at least as good performance as the QDeclarativeUtils versions. Change-Id: I5b8dd58f9b597f716b53563d07d39d894c5dd666 Reviewed-on: http://codereview.qt-project.org/5059 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Reference V4 program dataAaron Kennedy2011-09-162-4/+10
| | | | | | | Change-Id: I84d520da16def8e48ac8bbfaab654450f776abc8 Task-number: QTBUG-21265 Reviewed-on: http://codereview.qt-project.org/4956 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Move all QML file parsing into the QDeclarativeScript namespaceAaron Kennedy2011-08-305-11/+11
| | | | | | Change-Id: I5969686a796cbfb2eeb3729014df7f01e51b0620 Reviewed-on: http://codereview.qt.nokia.com/3797 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Replace the hash tables with simple association lists.Roberto Raggi2011-08-303-33/+80
| | | | | | | Change-Id: If4fdd14bba6d800699be1bfd9f6b147bb5279a30 Reviewed-on: http://codereview.qt.nokia.com/3785 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Merge IR::Module and IR::Function.Roberto Raggi2011-08-305-97/+50
| | | | | | | | | | V4 compiles one function at time. There is no reson to keep IR::Module and IR::Function as separate classes. Change-Id: Ia6bf971d0d499b14847c3ca725f9cdf5c7e3916c Reviewed-on: http://codereview.qt.nokia.com/3784 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Speedup the V4 code generation.Roberto Raggi2011-08-305-31/+55
| | | | | | | | | | Skip discarded code and use QVarLengthArray instead of QByteArray to store the bytecode. Change-Id: I4c574e7a817595bc8942ed9a927e79339a2d7b40 Reviewed-on: http://codereview.qt.nokia.com/3760 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Use QDeclarativePool to allocate the V4 instructions.Roberto Raggi2011-08-305-100/+188
| | | | | | | Change-Id: Ib4a9748bf81392a901c8ae94a8746f2e52f7284e Reviewed-on: http://codereview.qt.nokia.com/3759 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Change the V4 IR so it can be stored in a memory pool.Roberto Raggi2011-08-305-64/+119
| | | | | | | | | | | | | | That is, remove members with a non-trivial destructor from IR::Stmt and IR::Expr (that's because we don't destroy the objects allocated in the pool). Added the method MemoryPool::reset() so we can clear the pool without disposing the allocated memory. Change-Id: I126332be387c016578c086db8b3aa8098b2507f6 Reviewed-on: http://codereview.qt.nokia.com/3758 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Some lexer improvement, mostly by avoiding QChar::isWhatever()Martin Jones2011-08-301-1/+2
| | | | | | | Change-Id: I330a45a2f611a594d9b0e9bb24ebef028654a8d8 Reviewed-on: http://codereview.qt.nokia.com/3756 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Improve performance of the QML front-endAaron Kennedy2011-08-303-15/+13
| | | | | | | | | | | Introduced a new lexer and a more efficient representation of the AST. Instead of creating unique name ids, we simply use QStringRef(s). Change-Id: I403472fa2bb74d2c87dd6314065306499677a3bf Authored-by: Roberto Raggi Reviewed-on: http://codereview.qt.nokia.com/3750 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Cache QML import directories and qmldir files.Martin Jones2011-08-301-0/+1
| | | | | | | | | Also a little less toUtf8(). Change-Id: Iefb255fad9e27553f29b184418e66ce317f1cd89 Reviewed-on: http://codereview.qt.nokia.com/3748 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>