aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix the computation of the start token position.Roberto Raggi2011-08-301-3/+5
| | | | | | | | Rewind the buffer pointer only when necessary. Change-Id: Idd78edc068b1c55d79c5674facd9c55270e536a8 Reviewed-on: http://codereview.qt.nokia.com/3787 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Fix initialization order.Roberto Raggi2011-08-301-2/+2
| | | | | | | Change-Id: I7a7121f658f85c88b3a5260481cf4e05df2dd218 Reviewed-on: http://codereview.qt.nokia.com/3786 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.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>
* Set the name of the default propertyRoberto Raggi2011-08-301-1/+8
| | | | | | Change-Id: I4f69b9e4e33a789215941f8021b8937c8aa2e7c1 Reviewed-on: http://codereview.qt.nokia.com/3783 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Fix wrong usage of QStringHash iterators.Roberto Raggi2011-08-301-12/+17
| | | | | | | | | The code was creating circular lists of overloads. Change-Id: I126140dae90fbdf71a53fc8163fe2b56bb069312 Reviewed-on: http://codereview.qt.nokia.com/3782 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Recompute the token length after the scan of a regexp.Roberto Raggi2011-08-301-0/+2
| | | | | | | Change-Id: I9042f261b374bee1a3f9cb8d2dc40e381a66732b Reviewed-on: http://codereview.qt.nokia.com/3781 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix visit of list-like AST nodes.Roberto Raggi2011-08-301-3/+3
| | | | | | | | | | | The method finish() of a list-like node will convert the circular list to a single-list. The right way to iterate is by looking at the member `next' and by invokign finish(). Change-Id: I85a45b691a6c7089cd1a765871a11a7c60c3cdff Reviewed-on: http://codereview.qt.nokia.com/3780 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix possible crash when using the QML lexer without an engine.Roberto Raggi2011-08-301-8/+10
| | | | | | | Change-Id: Ia7d820cf1a63eaf42041ab78e1f111d31358e4dd Reviewed-on: http://codereview.qt.nokia.com/3779 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix initialization of QDeclarativeVMEMetaData::PropertyData for variant ↵Roberto Raggi2011-08-301-1/+1
| | | | | | | | | | | | properties. The propertyType member for variant properties needs to be initialized to -1 (at least according to QDeclarativeVMEMetaObject::metaCall). Change-Id: I44f226f2bce3732f3a4220fe24617b5cb2292f97 Reviewed-on: http://codereview.qt.nokia.com/3778 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix comparison.Roberto Raggi2011-08-301-1/+1
| | | | | | | Change-Id: I58ae5237f3458ee4bada89d1d676645e575d681f Reviewed-on: http://codereview.qt.nokia.com/3777 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Compile.Roberto Raggi2011-08-301-3/+3
| | | | | | | Change-Id: Id8af2a65e54317a9300289a034c042d59b2c69bd Reviewed-on: http://codereview.qt.nokia.com/3776 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove deprecated QChar to ushort conversions.Roberto Raggi2011-08-301-5/+5
| | | | | | | Change-Id: I2411d2221e70685d1a1518e2f5eb2e693261e00d Reviewed-on: http://codereview.qt.nokia.com/3775 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Faster check for revisioned properties.Martin Jones2011-08-301-1/+21
| | | | | | | Change-Id: I8122c15d0467019bcd333ca111d2b248c5ca2d91 Reviewed-on: http://codereview.qt.nokia.com/3774 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Special case integers and strings in lexerAaron Kennedy2011-08-301-1/+37
| | | | | | | | | Reduces the amount of copying for integer numbers and uses a raw QStringRef for unescaped strings. Change-Id: I2ad29f4c67be72495e3209081761b9a1bb503f26 Reviewed-on: http://codereview.qt.nokia.com/3773 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Reduce allocationsAaron Kennedy2011-08-305-8/+61
| | | | | | Change-Id: I230424147ad195239d725359fcd6dc5568f102a7 Reviewed-on: http://codereview.qt.nokia.com/3772 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* less toUtf8()Martin Jones2011-08-303-8/+8
| | | | | | | Change-Id: I9c4b599511e755b8f93d8bb8a7cd3732ca380de0 Reviewed-on: http://codereview.qt.nokia.com/3771 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove some QString <-> utf8 conversions.Martin Jones2011-08-306-57/+57
| | | | | | | Change-Id: I4478ec805f5b1e05025baafaf7035b8fb57f9854 Reviewed-on: http://codereview.qt.nokia.com/3770 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Optimize default property resolution in compilerAaron Kennedy2011-08-307-53/+160
| | | | | | Change-Id: I90b677a190c0c59ba681a7643a9b13cfb938d5a1 Reviewed-on: http://codereview.qt.nokia.com/3769 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Use the cached property data when possibleAaron Kennedy2011-08-301-6/+4
| | | | | | | Change-Id: I6690208b9a4d99e485874c5253d69cb82938c8a6 Reviewed-on: http://codereview.qt.nokia.com/3768 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Introduce QHashField for use in "contains" tests.Aaron Kennedy2011-08-305-12/+141
| | | | | | Change-Id: I35aadace15b71b44c1b9e30a76eadf79fe03afad Reviewed-on: http://codereview.qt.nokia.com/3767 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Use QFieldList to manage dynamic properties, signals and slotsAaron Kennedy2011-08-304-167/+165
| | | | | | Change-Id: I27282a035a631dde30ee97412d3968ab525b2502 Reviewed-on: http://codereview.qt.nokia.com/3766 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Calculate the hash inside QHashedStringAaron Kennedy2011-08-301-3/+89
| | | | | | | | | This avoids calling into V8 to calculate the hash. This improves performance and removes the dependency on V8. Change-Id: I8ccb405cba15c7eda51a1d56652784164789de7f Reviewed-on: http://codereview.qt.nokia.com/3765 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Use strings more conservativelyAaron Kennedy2011-08-3011-111/+446
| | | | | | | | | Also adds the ability to efficiently estimate the length of, and write out to, UTF8 from QHashedStringRef. Change-Id: I8b6226ba41d855246ddf7d6268f8045c92ae219e Reviewed-on: http://codereview.qt.nokia.com/3764 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Add QFastMetaBuilderAaron Kennedy2011-08-308-154/+914
| | | | | | | | | | | This is a faster, but less convenient, version of QMetaObjectBuilder. The aim is to reduce allocations made during building the meta object by doing it in two passes - first you reserve all the strings needed and then you provide their data. Change-Id: Id9caf9c9c6c2ab6a5219e5cea9363463a4ebf822 Reviewed-on: http://codereview.qt.nokia.com/3763 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Inline a couple of often used methods.Martin Jones2011-08-303-5/+2
| | | | | | | Change-Id: I6fdcebd45835e7700fc470790a259e256fa68066 Reviewed-on: http://codereview.qt.nokia.com/3762 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* CompileRoberto Raggi2011-08-301-1/+1
| | | | | | | Change-Id: Id7a5520d0e344b708aabacd0b0aefa705b47b197 Reviewed-on: http://codereview.qt.nokia.com/3761 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-306-106/+188
| | | | | | | | | | | | | | 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>
* Removed QDeclarativeJS::NodePoolRoberto Raggi2011-08-3013-554/+408
| | | | | | | Change-Id: I69d39ef005900803f6c620ea8f1ca00d054dc8d2 Reviewed-on: http://codereview.qt.nokia.com/3757 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-306-85/+199
| | | | | | | 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>
* Improved parsing of numeric literalsRoberto Raggi2011-08-303-31/+85
| | | | | | | Change-Id: Id02b5b0b0ab590b7ea5d20098472459e1fd986a6 Reviewed-on: http://codereview.qt.nokia.com/3755 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Optimizations to imports.Martin Jones2011-08-309-123/+241
| | | | | | | Change-Id: If4a51ad3b7c0ecc2261eea1d07a949119c3ad860 Reviewed-on: http://codereview.qt.nokia.com/3754 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Don't unnecessarily construct QMetaPropertysAaron Kennedy2011-08-304-158/+195
| | | | | | | | | As we store everything as a QDeclarativePropertyCache::Data internally anyway, operate exclusively against this structure. Change-Id: Id963bc001ce56ebf07b9b13082bb082d5d93ddd2 Reviewed-on: http://codereview.qt.nokia.com/3753 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Clearing a hash makes its length 0.Martin Jones2011-08-301-0/+1
| | | | | | | Change-Id: Ie5b1251212b504d7a7621abdd7fe4e9305790846 Reviewed-on: http://codereview.qt.nokia.com/3752 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove unnecessary toString()Aaron Kennedy2011-08-301-4/+4
| | | | | | | Change-Id: I0c39bf9c96d65ba1ed4faffffebfd9b89016b3d7 Reviewed-on: http://codereview.qt.nokia.com/3751 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-3022-2314/+2585
| | | | | | | | | | | 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>
* Remove invalid assertMartin Jones2011-08-301-1/+0
| | | | | | | Change-Id: Ia0544cf8c1d236977f193ad4c5726217035cabcb Reviewed-on: http://codereview.qt.nokia.com/3749 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Cache QML import directories and qmldir files.Martin Jones2011-08-3010-96/+225
| | | | | | | | | 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>
* Remove some QHash and QLists.Aaron Kennedy2011-08-308-48/+55
| | | | | | Change-Id: I153fa1abbe27f0724e453c5c979f740e956819c9 Reviewed-on: http://codereview.qt.nokia.com/3747 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QStringHash improvementsAaron Kennedy2011-08-302-165/+295
| | | | | | Change-Id: I1844460095f4de4980d458dc696c0aab8b504c23 Reviewed-on: http://codereview.qt.nokia.com/3746 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Improve QStringHashAaron Kennedy2011-08-305-71/+378
| | | | | | | | We now support reserving nodes, and keys that are ASCII strings. Change-Id: I9cc04438a1e9ceee1081cb1216e0273227551222 Reviewed-on: http://codereview.qt.nokia.com/3745 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Use memory more conservatively during QML compilationAaron Kennedy2011-08-3013-649/+1242
| | | | | | Change-Id: I63af79e575345bce00d724f1e7c87606156d1479 Reviewed-on: http://codereview.qt.nokia.com/3744 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Move tools classes into their own directoryAaron Kennedy2011-08-3013-10/+17
| | | | | | | Change-Id: Ic8a3a35f36259659cb83b5e11641af47bd8b18a9 Reviewed-on: http://codereview.qt.nokia.com/3743 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove some QByteArray<->QString conversionsAaron Kennedy2011-08-308-83/+94
| | | | | | Change-Id: Ieba3e1754d6438bb13fe7bf9963456a29d122129 Reviewed-on: http://codereview.qt.nokia.com/3742 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* More efficient type name cacheAaron Kennedy2011-08-3011-291/+626
| | | | | | | | | | Instead of creating completely separate hashes for all the types used by every QML file, we simply link to the QDeclarativeTypeModule. This uses much less memory, and is faster to construct at startup. Change-Id: I28bc2807074f9c6f38096d6e4ce8be744159d023 Reviewed-on: http://codereview.qt.nokia.com/3741 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Include v8-debug.h from the right locationKent Hansen2011-08-301-1/+1
| | | | | | | | | | Now that V8 is its own module in Qt, the V8 headers are accessible as <private/v8*>. Change-Id: Ieedf2e2618ec5fae62e6d277e469553f1b0f96f1 Reviewed-on: http://codereview.qt.nokia.com/3872 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Add more proportionality modes to PointAttractorAlan Alpert2011-08-302-7/+19
| | | | | | | | | | | Inverse proportionality is now properly named, direct proportionality is added, and constant as well (in case they all just draw towards a point). Change-Id: I6187c0df908fdf20e2bb0b0a1007ebcc38dd3ac2 Reviewed-on: http://codereview.qt.nokia.com/3868 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QDeclarative::hasActiveFocus should return false for hidden itemsAlan Alpert2011-08-301-2/+2
| | | | | | | | | | Forward-port of a1b2be3c8a64aee832c648c6dcdff003f22318a3 from 4.8 Task-number: QTBUG-21045 Change-Id: I055e4dd18e43ccce92d0cae96b10809adb4dcc3a Reviewed-on: http://codereview.qt.nokia.com/3857 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>