diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-01-10 09:15:33 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-12 13:59:12 +0000 |
commit | 6b110a30df178b2aaace579841e5bd74f2e9ee99 (patch) | |
tree | ecb973cec95232bddc35ce79cc24fa0374d5fc8c /src/qml/jsruntime/qv4internalclass.cpp | |
parent | 6002b48c3c5edc509c269c801fc8a088d5065ce8 (diff) |
Rename InternalClass::id to protoId
It really identifies the 'revision' of the prototype chain
that is being used with this internal class.
Change-Id: Id5829c055cde2c1a2ca1032a7e831b3f0428774e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4internalclass.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp index b42afcf027..be9a12bc34 100644 --- a/src/qml/jsruntime/qv4internalclass.cpp +++ b/src/qml/jsruntime/qv4internalclass.cpp @@ -145,7 +145,7 @@ void InternalClass::init(ExecutionEngine *engine) isFrozen = false; isSealed = false; isUsedAsProto = false; - id = engine->newInternalClassId(); + protoId = engine->newInternalClassId(); // Also internal classes need an internal class pointer. Simply make it point to itself internalClass.set(engine, this); @@ -170,7 +170,7 @@ void InternalClass::init(Heap::InternalClass *other) isSealed = other->isSealed; isFrozen = other->isFrozen; isUsedAsProto = other->isUsedAsProto; - id = engine->newInternalClassId(); + protoId = engine->newInternalClassId(); internalClass.set(engine, other->internalClass); } @@ -444,19 +444,19 @@ void InternalClass::removeChildEntry(InternalClass *child) } -void InternalClass::removeMember(QV4::Object *object, Identifier *id) +void InternalClass::removeMember(QV4::Object *object, Identifier *identifier) { Heap::InternalClass *oldClass = object->internalClass(); - Q_ASSERT(oldClass->propertyTable.lookup(id) < oldClass->size); + Q_ASSERT(oldClass->propertyTable.lookup(identifier) < oldClass->size); - Transition temp = { { id }, nullptr, Transition::RemoveMember }; + Transition temp = { { identifier }, nullptr, Transition::RemoveMember }; Transition &t = object->internalClass()->lookupOrInsertTransition(temp); if (!t.lookup) { // create a new class and add it to the tree Heap::InternalClass *newClass = oldClass->engine->newClass(oldClass); // simply make the entry inaccessible - int idx = newClass->propertyTable.removeIdentifier(id, oldClass->size); + int idx = newClass->propertyTable.removeIdentifier(identifier, oldClass->size); newClass->nameMap.set(idx, nullptr); newClass->propertyData.set(idx, PropertyAttributes()); t.lookup = newClass; @@ -611,7 +611,7 @@ Heap::InternalClass *InternalClass::asProtoClass() static void updateProtoUsage(Heap::Object *o, Heap::InternalClass *ic) { if (ic->prototype == o) - ic->id = ic->engine->newInternalClassId(); + ic->protoId = ic->engine->newInternalClassId(); for (auto &t : ic->transitions) { if (t.lookup) updateProtoUsage(o, t.lookup); |