Speedup JS instanceof operator
authorLars Knoll <lars.knoll@digia.com>
Thu, 14 Nov 2013 21:08:00 +0000 (22:08 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 4 Dec 2013 08:45:25 +0000 (09:45 +0100)
commit8e25658011699596996e80d3d08f17ef2efa0634
tree1b8322bd409e274c837e20dc64187fff3431fef2
parent0e864f2814959b0861ea5b07108893c2c4a047c6
Speedup JS instanceof operator

Cache the prototype of the functionobject, and inline hasInstance.
This removes a vtbl method and speeds things up quite a bit.

Change-Id: Ic68f301f7e09763d445a98bffa2cd201303f902e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4context.cpp
src/qml/jsruntime/qv4functionobject.cpp
src/qml/jsruntime/qv4functionobject_p.h
src/qml/jsruntime/qv4managed.cpp
src/qml/jsruntime/qv4managed_p.h
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4string.cpp