Reduce dependencies
authorLars Knoll <lars.knoll@theqtcompany.com>
Thu, 12 Feb 2015 21:17:37 +0000 (22:17 +0100)
committerLars Knoll <lars.knoll@digia.com>
Fri, 20 Mar 2015 11:16:48 +0000 (11:16 +0000)
Change-Id: I61ee4d25f8929d6723d2bf371efc122fa317e851
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4engine_p.h
src/qml/jsruntime/qv4managed_p.h
src/qml/jsruntime/qv4value_inl_p.h
src/qml/jsruntime/qv4value_p.h

index 8392dd8..41a5eac 100644 (file)
@@ -45,6 +45,7 @@ struct CompilationUnit;
 struct Function;
 }
 
+struct Identifier;
 struct CallContext;
 struct CatchContext;
 struct WithContext;
index bcb74ab..cf6efde 100644 (file)
@@ -37,6 +37,7 @@
 #include "private/qv4isel_p.h"
 #include "qv4managed_p.h"
 #include "qv4context_p.h"
+#include "qv4internalclass_p.h"
 #include <private/qintrusivelist_p.h>
 
 namespace WTF {
index 0fe5c7e..ac7d06a 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "qv4global_p.h"
 #include "qv4value_p.h"
-#include "qv4internalclass_p.h"
+#include <private/qv4heap_p.h>
 
 QT_BEGIN_NAMESPACE
 
index 3a4c5c4..bf1fbdd 100644 (file)
@@ -36,7 +36,7 @@
 #include <cmath> // this HAS to come
 
 #include "qv4value_p.h"
-
+#include <private/qv4heap_p.h>
 #include "qv4string_p.h"
 #include "qv4managed_p.h"
 #include "qv4engine_p.h"
@@ -178,6 +178,13 @@ inline bool Value::toBoolean() const
     }
 }
 
+inline
+ReturnedValue Heap::Base::asReturnedValue() const
+{
+    return Value::fromHeapObject(const_cast<Heap::Base *>(this)).asReturnedValue();
+}
+
+
 #ifndef V4_BOOTSTRAP
 inline uint Value::asArrayIndex() const
 {
@@ -269,8 +276,6 @@ inline ErrorObject *Value::asErrorObject() const
 template<typename T>
 inline T *Value::as() const { Managed *m = isObject() ? managed() : 0; return m ? m->as<T>() : 0; }
 
-#ifndef V4_BOOTSTRAP
-
 template<>
 inline String *value_cast(const Value &v) {
     return v.asString();
@@ -284,8 +289,6 @@ inline ReturnedValue value_convert<String>(ExecutionEngine *e, const Value &v)
 
 #endif
 
-#endif
-
 } // namespace QV4
 
 QT_END_NAMESPACE
index 8ed6c14..194b0ec 100644 (file)
 
 #include <QtCore/QString>
 #include "qv4global_p.h"
-#include <private/qv4heap_p.h>
 
 QT_BEGIN_NAMESPACE
 
 namespace QV4 {
 
+namespace Heap {
+    struct Base;
+}
+
 typedef uint Bool;
 
 struct Q_QML_PRIVATE_EXPORT Value
@@ -472,13 +475,6 @@ private:
     Encode(void *);
 };
 
-inline
-ReturnedValue Heap::Base::asReturnedValue() const
-{
-    return Value::fromHeapObject(const_cast<Heap::Base *>(this)).asReturnedValue();
-}
-
-
 template<typename T>
 T *value_cast(const Value &v)
 {