diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-27 12:00:44 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-03 08:08:42 +0000 |
commit | 8e7f28339f57d22e4a8bdb30af449151c89d75db (patch) | |
tree | e890fcdb4d6219668b4eaa4da9b1955cff09e52d /src/qml/jsruntime/qv4generatorobject.cpp | |
parent | 65e799a9dec58b4bde3a085149f8cbcf0f5f3fba (diff) |
Smaller refactoring of VME::exec() to preapre for upcoming changes
We'll need a more flexible interface here to support derived
constructors properly. There's also quite some code in the
generator functions that could benefit from some cleanups.
Change-Id: I951b5d2171efa80d52fd6b0155f8f2c78af2f3b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4generatorobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4generatorobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4generatorobject.cpp b/src/qml/jsruntime/qv4generatorobject.cpp index 25da2d0a75..d5ae863856 100644 --- a/src/qml/jsruntime/qv4generatorobject.cpp +++ b/src/qml/jsruntime/qv4generatorobject.cpp @@ -132,7 +132,7 @@ ReturnedValue GeneratorFunction::virtualCall(const FunctionObject *f, const Valu gp->cppFrame.parent = engine->currentStackFrame; engine->currentStackFrame = &gp->cppFrame; - Moth::VME::interpret(gp->cppFrame, function->codeData); + Moth::VME::interpret(&gp->cppFrame, engine, function->codeData); gp->state = GeneratorState::SuspendedStart; engine->currentStackFrame = gp->cppFrame.parent; @@ -236,7 +236,7 @@ ReturnedValue GeneratorObject::resume(ExecutionEngine *engine, const Value &arg) gp->cppFrame.jsFrame->accumulator = arg; Scope scope(engine); - ScopedValue result(scope, Moth::VME::interpret(gp->cppFrame, code)); + ScopedValue result(scope, Moth::VME::interpret(&gp->cppFrame, engine, code)); engine->currentStackFrame = gp->cppFrame.parent; |