diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-01-25 21:59:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 11:13:48 +0100 |
commit | bca28cb0d0dd922ee5d54e5d64d31b97ae5d0266 (patch) | |
tree | 012c4713ce27b1a0a07b5c298a8965127b9f7169 /src/qml/jsruntime/qv4scopedvalue_p.h | |
parent | d06cfd6126a23774ba4efe971ed5c8c148822889 (diff) |
Disentangle some includes
ScopedValue should require less dependencies. Hopefully we can then
move it together with the main class definition at some point (ie.
move ScopedValue int qv4value_p.h; similar for the other types).
Change-Id: Ie7b31715cb718a90dba40845c7ae785a29855062
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4scopedvalue_p.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index 4338d672f7..3b1f3d5e67 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -41,7 +41,7 @@ #ifndef QV4SCOPEDVALUE_P_H #define QV4SCOPEDVALUE_P_H -#include "qv4context_p.h" +#include "qv4engine_p.h" #include "qv4value_p.h" QT_BEGIN_NAMESPACE @@ -54,15 +54,7 @@ namespace QV4 { struct ScopedValue; struct Scope { - explicit Scope(ExecutionContext *ctx) - : engine(ctx->engine) -#ifndef QT_NO_DEBUG - , size(0) -#endif - { - mark = engine->jsStackTop; - } - + inline explicit Scope(ExecutionContext *ctx); explicit Scope(ExecutionEngine *e) : engine(e) #ifndef QT_NO_DEBUG @@ -234,7 +226,7 @@ struct Scoped Scoped(const Scope &scope, const Value &v, _Convert) { ptr = scope.engine->jsStackTop++; - ptr->val = value_convert<T>(scope.engine->currentContext(), v); + ptr->val = value_convert<T>(scope.engine, v); #ifndef QT_NO_DEBUG ++scope.size; #endif @@ -281,7 +273,7 @@ struct Scoped Scoped(const Scope &scope, const ReturnedValue &v, _Convert) { ptr = scope.engine->jsStackTop++; - ptr->val = value_convert<T>(scope.engine->currentContext(), QV4::Value::fromReturnedValue(v)); + ptr->val = value_convert<T>(scope.engine, QV4::Value::fromReturnedValue(v)); #ifndef QT_NO_DEBUG ++scope.size; #endif @@ -703,10 +695,6 @@ inline WeakValue &WeakValue::operator=(Returned<T> *obj) return operator=(QV4::Value::fromManaged(obj->getPointer()).asReturnedValue()); } -inline ReturnedValue CallContext::argument(int i) { - return i < callData->argc ? callData->args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue(); -} - } |