aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* V4: Fix setting of regexp flagsUlf Hermann2024-02-151-5/+5
| | | | | | | | | | | | | | | | We of course have to amend the previously set flags, not the origin. This only worked sort of because most of the flags are the same in input and output. This causes one test in the ECMAScript suite to pass and three to fail. Those three were passing for the wrong reason, relying on the confusion between the unicode and sticky flags. The failures are actually due to a defect in Yarr that will have to be addressed separately. Fixes: QTBUG-121509 Change-Id: Id930bba49e12dede2eb699e446eb528072f092b4 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* RegExp: Do on demand JIT compilationFabian Kosmale2024-02-131-26/+57
| | | | | | | | | | | | | | | | | | | | | | | JIT compiling means that we need to obtain executable memory for the jitted code. That has a non-neglibile cost (in addition to the runtime cost of compiling the pattern). Thus, only compile the pattern if we suspect it to be worthwhile: - when we called match multiple times - or when the string we match against is quite large We also assume that the JIT generally works, and thus discard the bytecode immediately before jitting – if the JIT fails once (either to compile, or with offset failure), we recompile the bytecode and never JIT this pattern again. Amends commit 04820be3011395bd5cb13dea8f81c9b9bca4da8f. Change-Id: I7aed4c0fdd85f1c69bc16cb2caa384aeabd62af2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Revert "RegExp: Do on demand JIT compilation"Fabian Kosmale2024-01-261-50/+26
| | | | | | | | | | This reverts commit 04820be3011395bd5cb13dea8f81c9b9bca4da8f. Reason for revert: Caused QTBUG-121535 Fixes: QTBUG-121535 Change-Id: Ie65a98bc8dd07e836cf663695d9259014581bda6 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* RegExp: Do on demand JIT compilationFabian Kosmale2024-01-231-26/+50
| | | | | | | | | | | | | | | | | | JIT compiling means that we need to obtain executable memory for the jitted code. That has a non-neglibile cost (in addition to the runtime cost of compiling the pattern). Thus, only compile the pattern if we suspect it to be worthwhile: - when we called match multiple times - or when the string we match against is quite large We also assume that the JIT generally works, and thus discard the bytecode immediately after jitting – if the JIT fails once (either to compile, or with offset failure), we recompile the bytecode and never JIT again. Change-Id: I91e9e10c5ab895af730dbb4a9bc85470dd794d1f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-6/+6
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add ; to Q_UNUSED and UNUSED_PARAMLars Schmertmann2020-06-261-1/+1
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix unused variable warningShawn Rutledge2020-01-071-2/+1
| | | | | | | This was fatal because of -Werror. Change-Id: Ibe06f77d4728268af3f099554f7151bdaf9ac26b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* When matching RegExps catch JIT failuresUlf Hermann2019-01-091-17/+43
| | | | | | | | | | | | | The Yarr JIT can generate code that fails to evaluate the RegExp at runtime. In that case we need to fall back to the interpreter. Also, don't needlessly cast the unsigned return value of RegExp::match to signed int before range-checking it. And fix some typos in the comments for the disassembler dumps. Fixes: QTBUG-72879 Change-Id: Ic8f80c076d6461d714816a9f66e1cac1d9b0c7a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement RegExp.prototype[Symbol.replace]Lars Knoll2018-08-151-0/+54
| | | | | Change-Id: I5a2c9cb1e9dcca664526b3949671d72d2ffee427 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Cleanup RegExpObjectLars Knoll2018-08-151-19/+34
| | | | | | | | | | | Move properties from RegExpObject to getters in RegExp.prototype to be compliant with the JS spec. Implement support for the sticky flags ('y') and correctly parse the flags in the RegExp constructor. Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable the Yarr JIT for regexps with nested parenthesisLars Knoll2018-08-111-1/+7
| | | | | Change-Id: I4e7a44ae2b5759febec6f83ab9fa85612515ab04 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable unicode regular expressionsLars Knoll2018-08-101-3/+6
| | | | | | | Add support for the 'u' flag for regular expressions. Change-Id: I409054eaa9c50183619752d14f2638f5a38c0ea7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update Yarr to the latest version from WebKitLars Knoll2018-08-101-7/+15
| | | | | | | | | | | Updated Yarr to a to commit 4d2a53d60487cb1f8b2a9a1e9f684af336fd7d2c in WebKit. Adjusted the yarr code base to work with our older version of wtf and masm. Change-Id: I04b4593ece051e1d7aa087b87aa08c92595d1098 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add Q_UNUSED(engine) to fix build on iOSShawn Rutledge2018-03-161-0/+2
| | | | | Change-Id: I47e84ee2c3f36dae9354e54b68ac60001703bf3d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crashes on WinRT when allocation of executable memory is disabledSimon Hausmann2018-02-091-3/+3
| | | | | | | | | | This regressed in commit b56f7d6f79b0de73c405b1503bfeb71ef5caf58f. We need to choose the YARR JIT (as well as the regular JIT) only if we can allocate executable memory. Change-Id: I150238fda7b3699cb1d7ffedeeed3c6f3f54132b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/dev' into HEADLars Knoll2017-10-221-4/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4isel_moth_p.h src/qml/compiler/qv4ssa.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm_p.h src/qml/jit/qv4regalloc.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexp.cpp src/qml/jsruntime/qv4regexp_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp tests/auto/qml/qml.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-201-4/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| | * Fix reuse of regexp objects by regexp literalsAllan Sandfeld Jensen2017-09-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accoding to the standard the regexp objects created by literals should be separate objects as if calling new. We were violating that by caching the same object for every instance of a literal. This also fixes a problem with leaking values of lastIndex between separate instances of the same global regexp literal. Task-number: QTBUG-62175 Change-Id: Ib22e9ee68de1d1209fbd4212e72f576bc059d245 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Don't compile both bytecode and JIT code for regexpsLars Knoll2017-08-291-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | Usually one of the two is sufficient :) Change-Id: Ib7ec021411839578c8dd0d7b50d9ec91460c4670 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Re-enable the YarrJITErik Verbruggen2017-08-281-1/+1
|/ / | | | | | | | | | | | | This makes a huge difference for regexp evaluation. Change-Id: I6b466f60280583c85d34be8734e8fef209b7b989 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / New mark table implementationLars Knoll2017-03-091-6/+0
|/ | | | | | | | | | | | | | | | | | | Automatically generate a table containing the data where JS Values and pointers are in objects in the JS heap. This will allow making the GC mark phase a lot more efficient. A bit of a special hack is currently required for MemberData and ArrayData, as they have a variable length, and we need to read the size from the object. We keep backwards compatibility with the old markObjects() functions for now (calling them if they are defined). Some further work on QV4::String and in a few other places is required before we can get remove the compatibility. Change-Id: I78528ace67e886bdbe4a4330c9677c7fc9f08a33 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Also check for correct destroy() chainingErik Verbruggen2016-10-061-0/+1
| | | | | | | | | Check that the destroy() method of Heap::Base was called when a Managed object needs destruction. This checks if a call to the parent's destroy() method was accidentally omitted. Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Make Heap::RegExp and Heap::String trivialErik Verbruggen2016-10-051-6/+9
| | | | | Change-Id: Ia8eda67c9d59069d3a64363699720a79ba1348a1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Introduce destroy() on Base subclassesErik Verbruggen2016-10-051-4/+8
| | | | | | | | This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Make all context objects trivialErik Verbruggen2016-09-301-0/+2
| | | | | | | | | | | | | | | This change also adds a check to the d() calls for Managed, verifies that the object has been initialized. This is only done for debug builds. To prevent other code from tripping the check, a number of other classes are either marked as trivial, or do initialization in the constructors. Because of template function changes in them memory manager (those now call init() instead of in-place new), String has an extra parameter to force it to temporarily use an old/unmodified template function. Change-Id: I8c35161ce7680835d830638b6d21498c5129b02b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* 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>