From 15630c45e7383cf23ff201af5330c36e32014cdd Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 14 Oct 2016 12:03:17 +0200 Subject: 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 --- src/qml/jsruntime/qv4qobjectwrapper_p.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4qobjectwrapper_p.h') 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) -- cgit v1.2.3