diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-17 10:03:47 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-23 06:51:57 +0100 |
commit | 4333dded89ce2e49f9ef3ef50ff474ec04e284dd (patch) | |
tree | 4f0f4f9214a0e0be147141de0992d4453644807e /src/qml/compiler | |
parent | f8f31dd0e1f9425ba272691c79e719ebc4bcfb94 (diff) |
Expose lookups to AOT compiled functions
This is based on QJSValue for now, but can be extended to operate on
QMetaType/void* later.
Change-Id: Ic63d4c9081090998afcca63ff3253963ff5096a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qv4compiler_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h index 4f3c718175..5155c25c06 100644 --- a/src/qml/compiler/qv4compiler_p.h +++ b/src/qml/compiler/qv4compiler_p.h @@ -125,6 +125,8 @@ struct Q_QMLCOMPILER_PRIVATE_EXPORT JSUnitGenerator { int registerSetterLookup(int nameIndex); int registerGlobalGetterLookup(int nameIndex); int registerQmlContextPropertyGetterLookup(int nameIndex); + int lookupNameIndex(int index) const { return lookups[index].nameIndex; } + QString lookupName(int index) const { return stringForIndex(lookupNameIndex(index)); } int registerRegExp(QQmlJS::AST::RegExpLiteral *regexp); |