aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix the RegExpCache to be GC safeLars Knoll2015-06-171-12/+11
| | | | | Change-Id: I6c20c2c5fcdaefa0743f7c1f50cf6dd8d8edc753 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move memory management related functionality into it's own folderLars Knoll2015-03-021-1/+1
| | | | | | | | | Start moving the memory related functionality into it's own folder. This will simplify refactoring of the GC related functionality later on. Change-Id: I70ec6f512af7a7897625afb84d914c17572b0ccd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* QML: Fix MSVC 2013/64bit warnings.Friedemann Kleint2015-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | compiler\qv4ssa.cpp(687) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(950) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(1117) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1120) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1148) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1266) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1622) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(2246) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(4289) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(4351) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data jit\qv4regalloc.cpp(1383) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1769) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1814) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(496) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(503) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(506) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4regexp.cpp(60) : warning C4267: 'return' : conversion from 'size_t' to 'uint', possible loss of data jsruntime\qv4typedarray.cpp(85) : warning C4309: '=' : truncation of constant value Change-Id: I0b04e1a9d379c068fb3efe90a9db8b592061e448 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the internalClass pointer into Heap::ObjectLars Knoll2015-01-211-2/+1
| | | | | | | | The other classes that derive from Heap::Base don't need it at all. So get rid of it there and save a pointer. Change-Id: I9c5df2e43cd6eeac2e6e41f3d3b8077d3afbc8f2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove all the setVTable() calls that aren't required anymoreLars Knoll2015-01-211-1/+0
| | | | | | | | The memory manager's allocation methods now set this up correctly for us :) Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the remaining bit of code that use the vtable in the internalClassLars Knoll2015-01-211-1/+1
| | | | | Change-Id: Ia52f0e6db325aab37477d455f163487b319dce29 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix RegExpCache to store Heap ObjectsLars Knoll2014-12-201-4/+4
| | | | | Change-Id: I1613c438f5b862436790f81c6a3d370cfe78b6a1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup destruction of heap objectsLars Knoll2014-11-211-5/+0
| | | | | | | | Generate the code from a macro instead of duplicating boiler plate code. Operate on Heap::Base instead of Managed. Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Replaced more usages of Returned<T> with Heap::T*Simon Hausmann2014-11-141-3/+3
| | | | | Change-Id: I451128ee71610bfeb71139c28da89a00a8209ec6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup RegExpLars Knoll2014-11-081-4/+4
| | | | | | | Move it's Data into the Heap namespace. Change-Id: I4ed6ea481376ae1d0c1fb08b56feee4764083231 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Begin moving the data out of Managed objectsLars Knoll2014-11-081-2/+2
| | | | | | | | | | | We need to move the Data objects out of the Managed objects, to avoid lots of trouble because inner classes can't be forward declared in C++. Instead move them all into a Heap namespace. Change-Id: I736af60702b68a1759f4643aa16d64108693dea2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Let markObjects() operate directly on HeapObjectsLars Knoll2014-11-041-1/+1
| | | | | | | | | This decouples things a bit better and helps moving over to directly store heapobject pointers in other objects. Change-Id: I798f922e018b0a3ca6f8768e4a810187f34d82f6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove some unneeded reinterpret_cast'sLars Knoll2014-11-041-3/+3
| | | | | Change-Id: I29ebc1f06bb3f0d20e6e21840c7fe326a0f4546d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Changed Value to store Managed::Data pointers directlySimon Hausmann2014-11-041-1/+2
| | | | | | | | This is a step towards storing direct heap object pointers for the values on the JS stack, to avoid the costly indirection for data access. Change-Id: Ibb57ed6cf52a7088bbc95ee04ae3a4cb25b8c045 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Change the object allocation schemeSimon Hausmann2014-07-221-5/+6
| | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convert regexpsLars Knoll2014-07-221-21/+18
| | | | | Change-Id: I5b62a265a7ce363a16b1e14ae93cadbb1ab0cb5b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert QV4RegExp to new storage schemeLars Knoll2014-07-221-9/+9
| | | | | Change-Id: Ic752b880ce3dfcb59f807794f0f54fb8ed0e61bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert RegExp and RegExpObject to new data layoutLars Knoll2014-07-221-15/+15
| | | | | Change-Id: I0c2bbab4b158069d5c1648edc38f7c5e38ee67ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Managed data into it's own subclassLars Knoll2014-07-221-1/+0
| | | | | | | | | This prepares for moving over to a d pointer scheme, where Managed subclasses don't hold any data directly. This is required to be able to move over to a modern GC. Change-Id: I3f59633ac07a7da461bd2d4f0f9f3a8e3b0baf02 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Split ManagedVTable into two classesLars Knoll2014-01-211-68/+0
| | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't return a Property pointer in Object::advanceIteratorLars Knoll2014-01-201-2/+2
| | | | | Change-Id: Iac4cb2a2252b18e40455910e51e3e374df7c1e80 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Managed::type and some flags into the vtableLars Knoll2014-01-031-2/+0
| | | | | | | | | | | | | Move the type flag into the vtable to free up these bits in the Managed class, and not have to set them at object construction time. As we often need to know whether a Managed object is a Object, FunctionObject or String, add some bitflags to test for these to the vtable. Change-Id: I7d08ca044544debb307b55f124f34cb086ad9e84 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove setVTable calls in performance critical areasLars Knoll2013-12-041-2/+1
| | | | | | | | | | Remove all the calls to setVTable that were in performance critical parts of the code. This now brings performance back to the level we had with the vtable inlined in the Managed objects. Change-Id: I76317cc5c53b5b700d1d3883b954407142a4c424 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the vtable pointer from the object to the internal classLars Knoll2013-12-041-1/+1
| | | | | | | | This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Refactor marking GC'ed objectsLars Knoll2013-11-051-1/+2
| | | | | | | | | | | Don't use recursive function calls anymore. Instead, push marked objects onto the JS stack, and then pop them off when their children are being marked. Should reduce stack memory usage, and improves performance by ~5%. Change-Id: I2d37d97579144fcba87ec8e9fd545dd220c01fbb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix various compiler warnings in order to remove warn_off in the near futureErik Verbruggen2013-11-041-0/+26
| | | | | Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix ObjectIterator API to be GC safeLars Knoll2013-10-021-1/+1
| | | | | Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove more occurrences of QV4::ValueLars Knoll2013-09-301-2/+2
| | | | | Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-281-2/+2
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert the remaining vtable methods to be GC safeLars Knoll2013-09-221-2/+2
| | | | | Change-Id: I679d1833609c41d71e8436ec0ba8a4624f0c4dd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert putIndexed()Lars Knoll2013-09-221-1/+1
| | | | | Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* convert Managed::put() API to be GC safeLars Knoll2013-09-221-1/+1
| | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use a StringRef for Managed::get()Lars Knoll2013-09-221-2/+2
| | | | | | | | | also store "toString" and "valueOf" as identifiers in the engine and fix two places where we compared strings the wrong way. Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use a ReturnedValue for Managed::getIndexed()Lars Knoll2013-09-181-2/+2
| | | | | Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use ReturnedValue for Managed::get().Lars Knoll2013-09-181-2/+2
| | | | | Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Restructure source codeLars Knoll2013-08-081-0/+180
Move the v4 engine classes from a subdir of qml/qml into two subdirs (compiler and jsruntime) of the qml module Remove an unsued qv4syntaxchecker class, and move the moth code directly into compiler. Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>