aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 82ace19d30..cced746568 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -369,7 +369,7 @@ struct InternalClass : Base {
bool isValid() const { return index != UINT_MAX; }
};
- IndexAndAttribute find(const PropertyKey id)
+ IndexAndAttribute findValueOrGetter(const PropertyKey id)
{
Q_ASSERT(id.isStringOrSymbol());
@@ -380,6 +380,19 @@ struct InternalClass : Base {
return { UINT_MAX, Attr_Invalid };
}
+ IndexAndAttribute findValueOrSetter(const PropertyKey id)
+ {
+ Q_ASSERT(id.isStringOrSymbol());
+
+ PropertyHash::Entry *e = propertyTable.lookup(id);
+ if (e && e->index < size) {
+ PropertyAttributes a = propertyData.at(e->index);
+ return { a.isAccessor() ? e->index + 1 : e->index, a };
+ }
+
+ return { UINT_MAX, Attr_Invalid };
+ }
+
uint indexOfValueOrGetter(const PropertyKey id)
{
Q_ASSERT(id.isStringOrSymbol());