From 607320ca9fb2796a5f6f2578578fd314f7e8b99e Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 23 Mar 2016 13:17:10 +0100 Subject: V4: allow inlining of ExecutionEngine::{qml,js}Engine() All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann --- src/particles/qquickv4particledata_p.h | 2 +- src/qml/jsapi/qjsengine.cpp | 1 + src/qml/jsapi/qjsvalue.cpp | 2 +- src/qml/jsapi/qjsvalue_p.h | 1 - src/qml/jsruntime/qv4engine.cpp | 2 ++ src/qml/jsruntime/qv4engine_p.h | 9 +++++++++ src/qml/jsruntime/qv4runtime.cpp | 1 + src/qml/jsruntime/qv4runtime_p.h | 7 +++++++ src/qml/jsruntime/qv4serialize.cpp | 1 + src/qml/jsruntime/qv4variantobject.cpp | 1 + src/qml/qml/qqmlboundsignal.cpp | 1 + src/qml/qml/qqmlcomponent.cpp | 1 + src/qml/qml/qqmlcontextwrapper.cpp | 1 + src/qml/qml/qqmlcontextwrapper_p.h | 8 -------- src/qml/qml/qqmljavascriptexpression.cpp | 1 + src/qml/qml/qqmllistwrapper.cpp | 1 + src/qml/qml/qqmllocale_p.h | 1 + src/qml/qml/qqmlobjectcreator.cpp | 1 + src/qml/qml/qqmltypewrapper.cpp | 1 + src/qml/qml/qqmlvaluetypewrapper.cpp | 1 + src/qml/qml/qqmlvmemetaobject.cpp | 1 + src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 1 + src/qml/qml/v8/qv8engine.cpp | 1 + src/qml/qml/v8/qv8engine_p.h | 8 +++----- src/qml/types/qqmldelegatemodel_p_p.h | 2 +- src/qml/types/qqmllistmodel_p_p.h | 1 + src/qml/types/qqmllistmodelworkeragent_p.h | 1 + src/qmltest/quicktestresult.cpp | 1 + src/quick/items/context2d/qquickcanvasitem.cpp | 1 + src/quick/items/context2d/qquickcanvasitem_p.h | 1 + src/quick/items/context2d/qquickcontext2d.cpp | 1 + src/quick/items/context2d/qquickcontext2d_p.h | 1 + src/quick/items/qquickimage.cpp | 1 + src/quick/items/qquickitem.cpp | 1 + 34 files changed, 49 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/particles/qquickv4particledata_p.h b/src/particles/qquickv4particledata_p.h index 0d88f0f9cc..437491ff42 100644 --- a/src/particles/qquickv4particledata_p.h +++ b/src/particles/qquickv4particledata_p.h @@ -52,7 +52,7 @@ // #include - +#include #include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index 5bcc4600a2..9c952f0d42 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -50,6 +50,7 @@ #include "private/qv4runtime_p.h" #include #include +#include #include #include diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index e369842252..ec7848aba2 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -54,7 +54,7 @@ #include "private/qv8engine_p.h" #include #include - +#include /*! \since 5.0 diff --git a/src/qml/jsapi/qjsvalue_p.h b/src/qml/jsapi/qjsvalue_p.h index 9caeccec9d..25afd9275c 100644 --- a/src/qml/jsapi/qjsvalue_p.h +++ b/src/qml/jsapi/qjsvalue_p.h @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index b42dc37b0f..d9692a0876 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -112,6 +112,7 @@ static ReturnedValue throwTypeError(CallContext *ctx) } +#ifdef V4_BOOTSTRAP QJSEngine *ExecutionEngine::jsEngine() const { return v8Engine->publicEngine(); @@ -121,6 +122,7 @@ QQmlEngine *ExecutionEngine::qmlEngine() const { return v8Engine->engine(); } +#endif // V4_BOOTSTRAP qint32 ExecutionEngine::maxCallDepth = -1; diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 73d506c4d2..aeb2533d35 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -57,6 +57,10 @@ #include "qv4internalclass_p.h" #include +#ifndef V4_BOOTSTRAP +# include +#endif + namespace WTF { class BumpPointerAllocator; class PageAllocation; @@ -135,8 +139,13 @@ public: Function *globalCode; +#ifdef V4_BOOTSTRAP QJSEngine *jsEngine() const; QQmlEngine *qmlEngine() const; +#else // !V4_BOOTSTRAP + QJSEngine *jsEngine() const { return v8Engine->publicEngine(); } + QQmlEngine *qmlEngine() const { return v8Engine->engine(); } +#endif // V4_BOOTSTRAP QV8Engine *v8Engine; enum JSObjects { diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 4bc81e414a..0e10f7699e 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -38,6 +38,7 @@ ****************************************************************************/ #include "qv4global_p.h" +#include "qv4engine_p.h" #include "qv4runtime_p.h" #ifndef V4_BOOTSTRAP #include "qv4object_p.h" diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h index 51cc4f50b0..b63777e164 100644 --- a/src/qml/jsruntime/qv4runtime_p.h +++ b/src/qml/jsruntime/qv4runtime_p.h @@ -61,6 +61,8 @@ QT_BEGIN_NAMESPACE +class QQmlAccessors; + #undef QV4_COUNT_RUNTIME_FUNCTIONS namespace QV4 { @@ -100,9 +102,14 @@ enum TypeHint { // This is a trick to tell the code generators that functions taking a NoThrowContext won't // throw exceptions and therefore don't need a check after the call. + +#ifndef V4_BOOTSTRAP struct NoThrowEngine : public ExecutionEngine { }; +#else +struct NoThrowEngine; +#endif struct Q_QML_PRIVATE_EXPORT Runtime { // call diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp index f803f2fb06..14def49d0a 100644 --- a/src/qml/jsruntime/qv4serialize.cpp +++ b/src/qml/jsruntime/qv4serialize.cpp @@ -48,6 +48,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/jsruntime/qv4variantobject.cpp b/src/qml/jsruntime/qv4variantobject.cpp index 743a11d31e..444c0a37e0 100644 --- a/src/qml/jsruntime/qv4variantobject.cpp +++ b/src/qml/jsruntime/qv4variantobject.cpp @@ -42,6 +42,7 @@ #include "qv4objectproto_p.h" #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 9879763c72..dc215ba8a5 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -55,6 +55,7 @@ #include "qqmlinfo.h" #include +#include #include #include diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 2f4d9ec909..28eaae190b 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -60,6 +60,7 @@ #include #include #include +#include #include #include diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 02d7f1f6e3..2d0ebad764 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -53,6 +53,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlcontextwrapper_p.h b/src/qml/qml/qqmlcontextwrapper_p.h index d2c7ecdea2..ca7fcf1d75 100644 --- a/src/qml/qml/qqmlcontextwrapper_p.h +++ b/src/qml/qml/qqmlcontextwrapper_p.h @@ -54,21 +54,13 @@ #include #include -#include #include #include -#include QT_BEGIN_NAMESPACE namespace QV4 { -namespace CompiledData { -struct Function; -} - -struct QmlContextWrapper; - namespace Heap { struct QmlContextWrapper : Object { diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 069dadd1c9..8ba4b5eba1 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp index f203dd3607..5c35866274 100644 --- a/src/qml/qml/qqmllistwrapper.cpp +++ b/src/qml/qml/qqmllistwrapper.cpp @@ -44,6 +44,7 @@ #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h index 6769a9a123..652a3ca0d4 100644 --- a/src/qml/qml/qqmllocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -56,6 +56,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index cfe1c86eba..eec9e5e2c9 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 33fe655368..7892555f08 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp index d313557e98..04a556f46c 100644 --- a/src/qml/qml/qqmlvaluetypewrapper.cpp +++ b/src/qml/qml/qqmlvaluetypewrapper.cpp @@ -50,6 +50,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index f3d1c4121f..775309d04a 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -55,6 +55,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index ecfc817d3b..b9fb1f4ffe 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -62,6 +62,7 @@ #include #include #include +#include #include #include diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 6949eb43e8..46fd4fbbeb 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 4ffd36ca34..2cfa996409 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -60,22 +60,20 @@ #include #include -#include +#include #include "private/qintrusivelist_p.h" -#include -#include #include -#include #include -#include +#include QT_BEGIN_NAMESPACE namespace QV4 { struct ArrayObject; struct ExecutionEngine; + struct QObjectMethod; } // Uncomment the following line to enable global handle debugging. When enabled, all the persistent diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qml/types/qqmldelegatemodel_p_p.h index 76e55f718d..bf9fd99f19 100644 --- a/src/qml/types/qqmldelegatemodel_p_p.h +++ b/src/qml/types/qqmldelegatemodel_p_p.h @@ -41,7 +41,7 @@ #define QQMLDATAMODEL_P_P_H #include "qqmldelegatemodel_p.h" - +#include #include #include diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qml/types/qqmllistmodel_p_p.h index a59b8de525..f519b5ff61 100644 --- a/src/qml/types/qqmllistmodel_p_p.h +++ b/src/qml/types/qqmllistmodel_p_p.h @@ -54,6 +54,7 @@ #include "qqmllistmodel_p.h" #include #include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qml/types/qqmllistmodelworkeragent_p.h index f9872a6ad4..1a891c0f25 100644 --- a/src/qml/types/qqmllistmodelworkeragent_p.h +++ b/src/qml/types/qqmllistmodelworkeragent_p.h @@ -53,6 +53,7 @@ #include +#include #include #include diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index 235b532dbb..0a820b79db 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 68f465cc5a..4abcc722d1 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -55,6 +55,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index b99fcf869d..4f94393a45 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -53,6 +53,7 @@ #include #include +#include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index ced4d2a6c4..b2117d3eb9 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include #include diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 818db0868c..cfb62ee052 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -66,6 +66,7 @@ #include #include +#include //#define QQUICKCONTEXT2D_DEBUG //enable this for just DEBUG purpose! diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp index c04a526bd0..a168b43fd1 100644 --- a/src/quick/items/qquickimage.cpp +++ b/src/quick/items/qquickimage.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 95b4e09aa5..3573788855 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -71,6 +71,7 @@ #include #include +#include #include #ifndef QT_NO_CURSOR -- cgit v1.2.3