aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-11-04 14:57:59 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-14 21:45:50 +0000
commit5c0481c1934ef4b39437eef06ddfa15170473bcb (patch)
tree4f5418b31e53417a94f01c2ba0e9b83e4509c54e /src/qml/jsruntime/qv4object.cpp
parent002fdc48d43e4fd67921e0cd46c28d28aee06848 (diff)
Simplify inline getters
Precalculate the offset inside the object. Change-Id: I61faf463677fe9602fe235a39dcf9e16c5d013cd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index a9aa8f30a9..8fbcadfd4a 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -529,9 +529,10 @@ ReturnedValue Object::getLookup(const Managed *m, Lookup *l)
Q_ASSERT(l->classList[0] == o->internalClass());
if (l->level == 0) {
uint nInline = o->d()->vtable()->nInlineProperties;
- if (l->index < nInline)
+ if (l->index < nInline) {
+ l->index += o->d()->vtable()->inlinePropertyOffset;
l->getter = Lookup::getter0Inline;
- else {
+ } else {
l->index -= nInline;
l->getter = Lookup::getter0MemberData;
}