diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-07-04 22:04:49 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-07-05 09:06:46 +0000 |
commit | 493edae038338320fb29a3eb252f76c2ff24b74f (patch) | |
tree | ffefca70b2221aa7e8a145f8334fbaf1e5f8d268 /src/qml/jsruntime/qv4context_p.h | |
parent | cfb17c44cf3ae1268d066ba414759068059a7bbd (diff) |
Get rid of the GlobalContext and WithContext classes
They are just ExecutionContext's.
Change-Id: Id543934740b0e54172e469935513847224b19e79
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4context_p.h | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h index 3ecdc594b6..e6405350dd 100644 --- a/src/qml/jsruntime/qv4context_p.h +++ b/src/qml/jsruntime/qv4context_p.h @@ -70,7 +70,6 @@ struct Identifier; struct CallContext; struct SimpleCallContext; struct CatchContext; -struct WithContext; struct QmlContext; struct QQmlContextWrapper; @@ -198,15 +197,6 @@ Q_STATIC_ASSERT(offsetof(CallContextData, function) == 0); // example it is not. Therefore we have a padding in place and always have a distance of 8 bytes. Q_STATIC_ASSERT(offsetof(CallContextData, locals) == offsetof(CallContextData, function) + 8); -#define GlobalContextMembers(class, Member) - -DECLARE_HEAP_OBJECT(GlobalContext, ExecutionContext) { - DECLARE_MARK_TABLE(GlobalContext); - - void init(ExecutionEngine *engine); -}; -V4_ASSERT_IS_TRIVIAL(GlobalContext) - #define CatchContextMembers(class, Member) \ Member(class, Pointer, String *, exceptionVarName) \ Member(class, HeapValue, HeapValue, exceptionValue) @@ -218,15 +208,6 @@ DECLARE_HEAP_OBJECT(CatchContext, ExecutionContext) { }; V4_ASSERT_IS_TRIVIAL(CatchContext) -#define WithContextMembers(class, Member) - -DECLARE_HEAP_OBJECT(WithContext, ExecutionContext) { - DECLARE_MARK_TABLE(WithContext); - - void init(ExecutionContext *outerContext, Object *with); -}; -V4_ASSERT_IS_TRIVIAL(WithContext) - } struct Q_QML_EXPORT ExecutionContext : public Managed @@ -240,7 +221,7 @@ struct Q_QML_EXPORT ExecutionContext : public Managed V4_INTERNALCLASS(ExecutionContext) Heap::CallContext *newCallContext(Function *f, CallData *callData); - Heap::WithContext *newWithContext(Heap::Object *with); + Heap::ExecutionContext *newWithContext(Heap::Object *with); Heap::CatchContext *newCatchContext(Heap::String *exceptionVarName, ReturnedValue exceptionValue); void createMutableBinding(String *name, bool deletable); @@ -252,8 +233,6 @@ struct Q_QML_EXPORT ExecutionContext : public Managed inline SimpleCallContext *asSimpleCallContext(); inline const SimpleCallContext *asSimpleCallContext() const; - inline const CatchContext *asCatchContext() const; - inline const WithContext *asWithContext() const; Function *getFunction() const; @@ -297,22 +276,11 @@ struct Q_QML_EXPORT CallContext : public SimpleCallContext V4_MANAGED(CallContext, SimpleCallContext) }; -struct GlobalContext : public ExecutionContext -{ - V4_MANAGED(GlobalContext, ExecutionContext) - -}; - struct CatchContext : public ExecutionContext { V4_MANAGED(CatchContext, ExecutionContext) }; -struct WithContext : public ExecutionContext -{ - V4_MANAGED(WithContext, ExecutionContext) -}; - inline SimpleCallContext *ExecutionContext::asSimpleCallContext() { return d()->type >= Heap::ExecutionContext::Type_SimpleCallContext ? static_cast<SimpleCallContext *>(this) : 0; @@ -323,16 +291,6 @@ inline const SimpleCallContext *ExecutionContext::asSimpleCallContext() const return d()->type >= Heap::ExecutionContext::Type_SimpleCallContext ? static_cast<const SimpleCallContext *>(this) : 0; } -inline const CatchContext *ExecutionContext::asCatchContext() const -{ - return d()->type == Heap::ExecutionContext::Type_CatchContext ? static_cast<const CatchContext *>(this) : 0; -} - -inline const WithContext *ExecutionContext::asWithContext() const -{ - return d()->type == Heap::ExecutionContext::Type_WithContext ? static_cast<const WithContext *>(this) : 0; -} - } // namespace QV4 QT_END_NAMESPACE |