diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-01-03 17:00:36 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-03-20 13:26:59 +0000 |
commit | 710580aa84c5c3273e883d9e650f3159ad8250f3 (patch) | |
tree | 40cedea160afc2d9e659a1c8ff029b9a8916e469 /src/qml/jsruntime/qv4qmlcontext_p.h | |
parent | 69d76d59cec0dcff4c52eef24e779fbef14beeca (diff) |
Accelerate access to singletons and imported scripts
Use a dedicated lookup type to provide super fast access to engine wide
singleton objects as well as scripts
Task-number: QTBUG-69898
Change-Id: Ie430f48f6576a9171018ef18742dcf6b2adb4310
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qmlcontext_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext_p.h b/src/qml/jsruntime/qv4qmlcontext_p.h index f704280bf4..5eacea5830 100644 --- a/src/qml/jsruntime/qv4qmlcontext_p.h +++ b/src/qml/jsruntime/qv4qmlcontext_p.h @@ -100,11 +100,13 @@ struct Q_QML_EXPORT QQmlContextWrapper : Object inline QQmlContextData *getContext() const { return *d()->context; } static ReturnedValue getPropertyAndBase(const QQmlContextWrapper *resource, PropertyKey id, const Value *receiver, - bool *hasProperty, Value *base); + bool *hasProperty, Value *base, Lookup *lookup = nullptr); static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver); static ReturnedValue resolveQmlContextPropertyLookupGetter(Lookup *l, ExecutionEngine *engine, Value *base); + static ReturnedValue lookupScript(Lookup *l, ExecutionEngine *engine, Value *base); + static ReturnedValue lookupSingleton(Lookup *l, ExecutionEngine *engine, Value *base); }; struct Q_QML_EXPORT QmlContext : public ExecutionContext |