Fix typo and apply some cosmetics

Change-Id: If51b86e1741b7e9f0e7e4d5f593496bd28cec081
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
This commit is contained in:
Ulf Hermann 2022-04-11 14:13:00 +02:00
parent b9dcf12a46
commit cfefda0e00
5 changed files with 13 additions and 13 deletions

View File

@ -747,7 +747,7 @@ struct Object
HasDeferredBindings = 0x2, // any of the bindings are deferred
HasCustomParserBindings = 0x4,
IsInlineComponentRoot = 0x8,
InPartOfInlineComponent = 0x10
IsPartOfInlineComponent = 0x10
};
// Depending on the use, this may be the type name to instantiate before instantiating this

View File

@ -586,7 +586,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiInlineComponent *ast)
Q_ASSERT(idx > 0);
Object* definedObject = _objects.at(idx);
definedObject->flags |= QV4::CompiledData::Object::IsInlineComponentRoot;
definedObject->flags |= QV4::CompiledData::Object::InPartOfInlineComponent;
definedObject->flags |= QV4::CompiledData::Object::IsPartOfInlineComponent;
auto inlineComponent = New<InlineComponent>();
inlineComponent->nameIndex = registerString(ast->name.toString());
inlineComponent->objectIndex = idx;
@ -705,7 +705,7 @@ bool IRBuilder::defineQMLObject(
_object->init(pool, registerString(asString(qualifiedTypeNameId)), emptyStringIndex, location);
_object->declarationsOverride = declarationsOverride;
if (insideInlineComponent) {
_object->flags |= QV4::CompiledData::Object::InPartOfInlineComponent;
_object->flags |= QV4::CompiledData::Object::IsPartOfInlineComponent;
}
// A new object is also a boundary for property declarations.

View File

@ -112,7 +112,7 @@ void fillAdjacencyListForInlineComponents(ObjectContainer *objectContainer, Adja
while (int(referencedInICObjectIndex) < objectContainer->objectCount()) {
auto potentiallyReferencedInICObject = objectContainer->objectAt(referencedInICObjectIndex);
bool stillInIC = !(potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::IsInlineComponentRoot)
&& (potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::InPartOfInlineComponent);
&& (potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::IsPartOfInlineComponent);
if (!stillInIC)
break;
createEdgeFromTypeRef(objectContainer->resolvedType(potentiallyReferencedInICObject->inheritedTypeNameIndex));

View File

@ -446,7 +446,7 @@ void ExecutableCompilationUnit::finalizeCompositeType(QQmlEnginePrivate *qmlEngi
const QV4::CompiledData::Object *obj = objectAt(i);
bool leftCurrentInlineComponent =
(i != lastICRoot && obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot)
|| !(obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent);
|| !(obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent);
if (leftCurrentInlineComponent)
break;
inlineComponentData[lastICRoot].totalBindingCount += obj->nBindings;
@ -476,7 +476,7 @@ void ExecutableCompilationUnit::finalizeCompositeType(QQmlEnginePrivate *qmlEngi
int objectCount = 0;
for (quint32 i = 0, count = this->objectCount(); i < count; ++i) {
const QV4::CompiledData::Object *obj = objectAt(i);
if (obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) {
if (obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent) {
continue;
}
bindingCount += obj->nBindings;

View File

@ -883,16 +883,16 @@ bool QQmlComponentAndAliasResolver::resolve(int root)
const int startObjectIndex = root == 0 ? root : root+1; // root+1, as ic root is handled at the end
for (int i = startObjectIndex; i < objCountWithoutSynthesizedComponents; ++i) {
QmlIR::Object *obj = qmlObjects->at(i);
const bool isInlineComponentRoot
= obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot;
const bool isPartOfInlineComponent
= obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent;
if (root == 0) {
// normal component root, skip over anything inline component related
if (obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot ||
obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) {
if (isInlineComponentRoot || isPartOfInlineComponent)
continue;
}
} else {
if (!(obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) ||
obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot)
break; // left current inline component (potentially entered a new one)
} else if (!isPartOfInlineComponent || isInlineComponentRoot) {
break; // left current inline component (potentially entered a new one)
}
QQmlPropertyCache::ConstPtr cache = propertyCaches.at(i);
if (obj->inheritedTypeNameIndex == 0 && !cache)