diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-03 14:55:18 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-24 15:20:55 +0200 |
| commit | 50dfcb2a16ef7b9c52a3beaa92a36569ffbcd85d (patch) | |
| tree | caed148fe35d5bbc47e4caa88f0816940e29167f /src/qml/compiler/qv4compiler.cpp | |
| parent | 48dc55dec2402a425e5370a566b16892abf07a95 (diff) | |
QML: Port QV4::CompiledData::Lookup to new special integer bitfield
Task-number: QTBUG-99545
Change-Id: I8cc6db56642f1cd2d16e80ba5c49ffd7c6fdcd8c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 6d92633f32ff2089b8f0a39e07f0d40bf57d8011)
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
| -rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 0e15f12053..c000861316 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -160,10 +160,7 @@ int QV4::Compiler::JSUnitGenerator::registerGetterLookup(const QString &name) int QV4::Compiler::JSUnitGenerator::registerGetterLookup(int nameIndex) { - CompiledData::Lookup l; - l.type_and_flags = CompiledData::Lookup::Type_Getter; - l.nameIndex = nameIndex; - lookups << l; + lookups << CompiledData::Lookup(CompiledData::Lookup::Type_Getter, nameIndex); return lookups.size() - 1; } @@ -174,28 +171,19 @@ int QV4::Compiler::JSUnitGenerator::registerSetterLookup(const QString &name) int QV4::Compiler::JSUnitGenerator::registerSetterLookup(int nameIndex) { - CompiledData::Lookup l; - l.type_and_flags = CompiledData::Lookup::Type_Setter; - l.nameIndex = nameIndex; - lookups << l; + lookups << CompiledData::Lookup(CompiledData::Lookup::Type_Setter, nameIndex); return lookups.size() - 1; } int QV4::Compiler::JSUnitGenerator::registerGlobalGetterLookup(int nameIndex) { - CompiledData::Lookup l; - l.type_and_flags = CompiledData::Lookup::Type_GlobalGetter; - l.nameIndex = nameIndex; - lookups << l; + lookups << CompiledData::Lookup(CompiledData::Lookup::Type_GlobalGetter, nameIndex); return lookups.size() - 1; } int QV4::Compiler::JSUnitGenerator::registerQmlContextPropertyGetterLookup(int nameIndex) { - CompiledData::Lookup l; - l.type_and_flags = CompiledData::Lookup::Type_QmlContextPropertyGetter; - l.nameIndex = nameIndex; - lookups << l; + lookups << CompiledData::Lookup(CompiledData::Lookup::Type_QmlContextPropertyGetter, nameIndex); return lookups.size() - 1; } |
