diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-04 11:47:38 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-17 11:15:18 +0200 |
commit | b1666574748065b485d371b813645ca04a35312d (patch) | |
tree | cd7b331f31c858ed1130cb43a68b41af9852a7a2 /src/qml/compiler | |
parent | 530d3749c59971e9ec3a8a333c6783842ebb288e (diff) |
QML: Port QV4::CompiledData::ParameterType to new special integer bitfield
Task-number: QTBUG-99545
Change-Id: I515aa7a605accc4b45f9dd4918dd6bfb6e116379
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 2642058df8429cd593d0c7adf45a818a42fc0d88)
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index cf8b6c1e8a..b5210e6510 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -106,20 +106,18 @@ bool Parameter::init(QV4::CompiledData::Parameter *param, const QV4::Compiler::J bool Parameter::initType(QV4::CompiledData::ParameterType *paramType, const QV4::Compiler::JSUnitGenerator *stringGenerator, int typeNameIndex) { - paramType->indexIsBuiltinType = false; - paramType->typeNameIndexOrBuiltinType = 0; const QString typeName = stringGenerator->stringForIndex(typeNameIndex); auto builtinType = stringToBuiltinType(typeName); if (builtinType == QV4::CompiledData::BuiltinType::InvalidBuiltin) { - if (typeName.isEmpty() || !typeName.at(0).isUpper()) + if (typeName.isEmpty() || !typeName.at(0).isUpper()) { + paramType->set(false, 0); return false; - paramType->indexIsBuiltinType = false; - paramType->typeNameIndexOrBuiltinType = typeNameIndex; + } Q_ASSERT(quint32(typeNameIndex) < (1u << 31)); + paramType->set(false, typeNameIndex); } else { - paramType->indexIsBuiltinType = true; - paramType->typeNameIndexOrBuiltinType = static_cast<quint32>(builtinType); Q_ASSERT(quint32(builtinType) < (1u << 31)); + paramType->set(true, static_cast<quint32>(builtinType)); } return true; } |