diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-03-23 13:17:10 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-05-20 13:44:13 +0000 |
commit | 607320ca9fb2796a5f6f2578578fd314f7e8b99e (patch) | |
tree | 4c3925a5e58ea52c415098169855494341ab5a77 /src/qml/jsruntime | |
parent | 41a426d78177b704cdf321fdf0b36b7cabc29a56 (diff) |
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 <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 9 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime_p.h | 7 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4serialize.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4variantobject.cpp | 1 |
6 files changed, 21 insertions, 0 deletions
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 <private/qintrusivelist_p.h> +#ifndef V4_BOOTSTRAP +# include <private/qv8engine_p.h> +#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 <private/qv4regexpobject_p.h> #include <private/qv4sequenceobject_p.h> #include <private/qv4objectproto_p.h> +#include <private/qv4qobjectwrapper_p.h> 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 <private/qqmlvaluetypewrapper_p.h> #include <private/qv8engine_p.h> +#include <private/qv4qobjectwrapper_p.h> QT_BEGIN_NAMESPACE |