diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-14 12:03:17 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-10-18 09:18:44 +0000 |
commit | 15630c45e7383cf23ff201af5330c36e32014cdd (patch) | |
tree | 665216d06d390df7a21166f0733c2528d1c51828 /src/qml/jsruntime/qv4qobjectwrapper_p.h | |
parent | e76ed6a2655894bd671ee7397a15f2e57cfc8d33 (diff) |
QML: allow QObjectWrapper::init to be inlined
And also hint that wrap_slowPath should not be inlined with LTO,
otherwise the fast-path wrap method will lose any advantage it has.
Change-Id: I30d52fa2f64b813aaeb5c0d62f6d48ec1ba03fa1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index 8b2fd506e8..504f6a69b8 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -78,7 +78,12 @@ namespace Heap { struct QQmlValueTypeWrapper; struct Q_QML_EXPORT QObjectWrapper : Object { - void init(QObject *object); + void init(QObject *object) + { + Object::init(); + qObj.init(object); + } + void destroy() { qObj.destroy(); Object::destroy(); @@ -196,7 +201,7 @@ protected: static ReturnedValue method_disconnect(CallContext *ctx); private: - static ReturnedValue wrap_slowPath(ExecutionEngine *engine, QObject *object); + Q_NEVER_INLINE static ReturnedValue wrap_slowPath(ExecutionEngine *engine, QObject *object); }; inline ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) |