diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-30 14:04:33 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:58:25 +0000 |
commit | 2fbb5c93c765ea53c3bd5f30b8bf769ccc88874a (patch) | |
tree | ee094ac1d677987af31b6199ef26f2bbab144966 /src/qml/jsruntime/qv4lookup_p.h | |
parent | d8c195149c784e3cf11df681229bcf6defba9256 (diff) |
Always pass the ExecutionEngine into lookup calls
This is required in preparation for proper write barriers,
where we'll need to check the engine whether the barrier is
enabled.
It also makes the lookup calls more consistent, and doesn't
affect performance in any measurable way.
Change-Id: Ia838237a44ba809d4643e2626bc81560388276e2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4lookup_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4lookup_p.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index c5ee92fedd..1b1c307530 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -67,14 +67,13 @@ namespace QV4 { struct Lookup { enum { Size = 4 }; union { - ReturnedValue (*indexedGetter)(Lookup *l, const Value &object, const Value &index); - void (*indexedSetter)(Lookup *l, const Value &object, const Value &index, const Value &v); + ReturnedValue (*indexedGetter)(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index); + void (*indexedSetter)(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index, const Value &v); ReturnedValue (*getter)(Lookup *l, ExecutionEngine *engine, const Value &object); ReturnedValue (*globalGetter)(Lookup *l, ExecutionEngine *engine); void (*setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v); }; union { - ExecutionEngine *engine; InternalClass *classList[Size]; struct { void *dummy0; @@ -90,13 +89,13 @@ struct Lookup { uint index; uint nameIndex; - static ReturnedValue indexedGetterGeneric(Lookup *l, const Value &object, const Value &index); - static ReturnedValue indexedGetterFallback(Lookup *l, const Value &object, const Value &index); - static ReturnedValue indexedGetterObjectInt(Lookup *l, const Value &object, const Value &index); + static ReturnedValue indexedGetterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index); + static ReturnedValue indexedGetterFallback(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index); + static ReturnedValue indexedGetterObjectInt(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index); - static void indexedSetterGeneric(Lookup *l, const Value &object, const Value &index, const Value &v); - static void indexedSetterFallback(Lookup *l, const Value &object, const Value &index, const Value &value); - static void indexedSetterObjectInt(Lookup *l, const Value &object, const Value &index, const Value &v); + static void indexedSetterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index, const Value &v); + static void indexedSetterFallback(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index, const Value &value); + static void indexedSetterObjectInt(Lookup *l, ExecutionEngine *engine, const Value &object, const Value &index, const Value &v); static ReturnedValue getterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object); static ReturnedValue getterTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object); |