diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-11-13 13:31:23 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-27 11:09:50 +0000 |
commit | 71f0bc8ce6244d4544dcd35a62ed8f163bb5b092 (patch) | |
tree | 3ccbb10947222c58a3cb74cdc5b10fb432b0fed3 /src/qml/jsruntime/qv4object_p.h | |
parent | 458daae517b4465fafb315323e9c727f1655764d (diff) |
Add a unique id to InternalClass that describes it's total state
So far the InternalClass only did describe the state of the class
itself, but it wouldn't change if some of the underlying
objects in the prototype chain changed. This now fixes that and
introduces a unique ID that completely describes the state of
the object including all it's prototypes.
This opens up for optimizing lookups down to one branch and a
load, independent of the depth of the value inside the prototype
chain.
Change-Id: I0787e0e4710f2f6703b1d5e35996124b3db2d2da
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index ff3ad7c0c6..0abb9b8fa5 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -129,6 +129,8 @@ DECLARE_EXPORTED_HEAP_OBJECT(Object, Base) { memberData->values.set(e, index, b); } + void setUsedAsProto(); + Heap::Object *prototype() const { return internalClass->prototype; } }; |