diff options
Diffstat (limited to 'src/qml/jsruntime/qv4lookup_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4lookup_p.h | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h index ce5189a780..826760aa2d 100644 --- a/src/qml/jsruntime/qv4lookup_p.h +++ b/src/qml/jsruntime/qv4lookup_p.h @@ -67,11 +67,9 @@ namespace QV4 { struct Lookup { enum { Size = 4 }; union { - 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); + bool (*setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v); }; union { InternalClass *classList[Size]; @@ -90,14 +88,6 @@ struct Lookup { uint index; uint nameIndex; - 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, 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); static ReturnedValue getterFallback(Lookup *l, ExecutionEngine *engine, const Value &object); @@ -133,15 +123,15 @@ struct Lookup { static ReturnedValue globalGetterAccessor1(Lookup *l, ExecutionEngine *engine); static ReturnedValue globalGetterAccessor2(Lookup *l, ExecutionEngine *engine); - static void setterGeneric(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setterTwoClasses(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setter0Inline(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setterInsert0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setterInsert1(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setterInsert2(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); - static void setter0setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterGeneric(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterTwoClasses(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setter0Inline(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterInsert0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterInsert1(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setterInsert2(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); + static bool setter0setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value); ReturnedValue lookup(const Value &thisObject, Object *obj, PropertyAttributes *attrs); ReturnedValue lookup(const Object *obj, PropertyAttributes *attrs); @@ -151,7 +141,6 @@ struct Lookup { Q_STATIC_ASSERT(std::is_standard_layout<Lookup>::value); // Ensure that these offsets are always at this point to keep generated code compatible // across 32-bit and 64-bit (matters when cross-compiling). -Q_STATIC_ASSERT(offsetof(Lookup, indexedGetter) == 0); Q_STATIC_ASSERT(offsetof(Lookup, getter) == 0); } |