diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-08-21 15:00:09 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-02 17:27:36 +0200 |
commit | da2f24d8e5c32fe4ed45dcb89aa357465f85fc1e (patch) | |
tree | 490d63078e83280990fc8c1b416d2d17600ea7d2 /src/qml/jsruntime/qv4engine.cpp | |
parent | 29f946cdad013d759aad05cbd22f40d0c152d6f3 (diff) |
move methods to create a new context into the ExecutionContext class
This avoids one indirection when calling the methods and cleans up
the engine a bit.
Change-Id: I426f41e23f6a7262af95b9807b00920530fef642
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 3b87888ab9..8e198aaa33 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -307,35 +307,6 @@ InternalClass *ExecutionEngine::newClass(const InternalClass &other) return new (classPool.allocate(sizeof(InternalClass))) InternalClass(other); } -WithContext *ExecutionEngine::newWithContext(Object *with) -{ - WithContext *w = static_cast<WithContext *>(memoryManager->allocContext(sizeof(WithContext))); - ExecutionContext *p = current; - current = w; - w->initWithContext(p, with); - return w; -} - -CatchContext *ExecutionEngine::newCatchContext(String *exceptionVarName, const Value &exceptionValue) -{ - CatchContext *c = static_cast<CatchContext *>(memoryManager->allocContext(sizeof(CatchContext))); - ExecutionContext *p = current; - current = c; - c->initCatchContext(p, exceptionVarName, exceptionValue); - return c; -} - -CallContext *ExecutionEngine::newQmlContext(FunctionObject *f, Object *qml) -{ - CallContext *c = static_cast<CallContext *>(memoryManager->allocContext(requiredMemoryForExecutionContect(f, 0))); - - ExecutionContext *p = current; - current = c; - c->initQmlContext(p, qml, f); - - return c; -} - ExecutionContext *ExecutionEngine::pushGlobalContext() { GlobalContext *g = static_cast<GlobalContext *>(memoryManager->allocContext(sizeof(GlobalContext))); |