diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-01-24 13:16:55 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 11:13:48 +0100 |
commit | 426b5647b6ac584cfa0a45ab932d4a4dfbcbadc4 (patch) | |
tree | 32ec22afc7ee39b6f9a3f4dd47a45c472f7d77e4 /src/qml/jsruntime/qv4lookup_p.h | |
parent | e3219a1f7143c52fad7f5c5266327e199d02c6d6 (diff) |
Implement Lookup::indexedSetter
use this instead of the generic runtime method. This gives
around 10% speedup for array heavy Javascript such
as crypto.js.
Change-Id: Ic8f478c5b18893f2ef49e3f658b1ef24ae22e64f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4lookup_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4lookup_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index 50874411de..7f107bf8eb 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -56,6 +56,7 @@ struct Lookup { enum { Size = 4 }; union { ReturnedValue (*indexedGetter)(Lookup *l, const ValueRef object, const ValueRef index); + void (*indexedSetter)(Lookup *l, const ValueRef object, const ValueRef index, const ValueRef v); ReturnedValue (*getter)(Lookup *l, const ValueRef object); ReturnedValue (*globalGetter)(Lookup *l, ExecutionContext *ctx); void (*setter)(Lookup *l, const ValueRef object, const ValueRef v); @@ -78,6 +79,10 @@ struct Lookup { static ReturnedValue indexedGetterFallback(Lookup *l, const ValueRef object, const ValueRef index); static ReturnedValue indexedGetterObjectInt(Lookup *l, const ValueRef object, const ValueRef index); + static void indexedSetterGeneric(Lookup *l, const ValueRef object, const ValueRef index, const ValueRef v); + static void indexedSetterFallback(Lookup *l, const ValueRef object, const ValueRef index, const ValueRef value); + static void indexedSetterObjectInt(Lookup *l, const ValueRef object, const ValueRef index, const ValueRef v); + static ReturnedValue getterGeneric(Lookup *l, const ValueRef object); static ReturnedValue getter0(Lookup *l, const ValueRef object); static ReturnedValue getter1(Lookup *l, const ValueRef object); |