Better way of retrieving the prototype property for FunctionObjects
authorLars Knoll <lars.knoll@digia.com>
Wed, 5 Mar 2014 07:40:11 +0000 (08:40 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Mar 2014 15:55:12 +0000 (16:55 +0100)
commitb8ca4132433c2d1eef0a6cda8be8a1754786702b
tree4ace1513d0aaaa09b98bcc39f2a4fb2e08e0d59d
parentf836b9837dda09c09c2ee3307300998ca5dff5c4
Better way of retrieving the prototype property for FunctionObjects

Make sure FunctionObjects always have the prototype property at
index 0. This way we can speed up the instanceOf operator even more,
and at the same time save 16-28 bytes of memory per FunctionObject.

Change-Id: I8527bc8f9dc7b04a9db8395b5f05bab47ddc21ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4engine_p.h
src/qml/jsruntime/qv4functionobject.cpp
src/qml/jsruntime/qv4functionobject_p.h