aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4lookup_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-11-13 15:42:43 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-27 11:09:57 +0000
commitd8fd2f51446ccac370c265fe309a28f80b7eb90e (patch)
tree03b35c6c8f51accd0292e098f7a8fc67344a69d5 /src/qml/jsruntime/qv4lookup_p.h
parentd31304eab9e7424edc20fb83a8a19cd979458029 (diff)
Convert primitive lookups to use the new ID in internal class
Change-Id: I1c2c3242f2a48e4e75b66b187127fcd362cd61c6 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4lookup_p.h')
-rw-r--r--src/qml/jsruntime/qv4lookup_p.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h
index e85cf86c0f..6a9a5cf419 100644
--- a/src/qml/jsruntime/qv4lookup_p.h
+++ b/src/qml/jsruntime/qv4lookup_p.h
@@ -92,24 +92,26 @@ struct Lookup {
int icIdentifier;
int icIdentifier2;
} protoLookupTwoClasses;
-
- InternalClass *classList[Size];
struct {
- void *dummy0;
- void *dummy1;
- void *dummy2;
+ // Make sure the next two values are in sync with protoLookup
+ const Value *data;
+ int icIdentifier;
+ unsigned type;
Heap::Object *proto;
- };
+ } primitiveLookup;
+
+ InternalClass *classList[Size];
};
union {
int level;
uint index2;
- unsigned type;
};
uint index;
uint nameIndex;
ReturnedValue resolveGetter(ExecutionEngine *engine, const Object *object);
+ ReturnedValue resolvePrimitiveGetter(ExecutionEngine *engine, const Value &object);
+ void resolveProtoGetter(Identifier *name, const Heap::Object *proto);
static ReturnedValue getterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object);
static ReturnedValue getterTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object);
@@ -126,13 +128,9 @@ struct Lookup {
static ReturnedValue getterProtoAccessor(Lookup *l, ExecutionEngine *engine, const Value &object);
static ReturnedValue getterProtoAccessorTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue primitiveGetter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue primitiveGetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue primitiveGetter1(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue primitiveGetterAccessor0(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue primitiveGetterAccessor1(Lookup *l, ExecutionEngine *engine, const Value &object);
+ static ReturnedValue primitiveGetterProto(Lookup *l, ExecutionEngine *engine, const Value &object);
+ static ReturnedValue primitiveGetterAccessor(Lookup *l, ExecutionEngine *engine, const Value &object);
static ReturnedValue stringLengthGetter(Lookup *l, ExecutionEngine *engine, const Value &object);
- static ReturnedValue arrayLengthGetter(Lookup *l, ExecutionEngine *engine, const Value &object);
static ReturnedValue globalGetterGeneric(Lookup *l, ExecutionEngine *engine);
static ReturnedValue globalGetter0Inline(Lookup *l, ExecutionEngine *engine);
@@ -155,7 +153,6 @@ struct Lookup {
ReturnedValue lookup(const Value &thisObject, Object *obj, PropertyAttributes *attrs);
ReturnedValue lookup(const Object *obj, PropertyAttributes *attrs);
-
};
Q_STATIC_ASSERT(std::is_standard_layout<Lookup>::value);