diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-10-23 10:10:28 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-13 08:56:04 +0000 |
commit | a2142203ad6cdb54ec063e259b40171e13c5d4bd (patch) | |
tree | 5da2bc88d9015b5f938e7dcd118bd9c5a93c3e5c /src/qml/jsruntime/qv4runtime.cpp | |
parent | 4d2763e425828ac35c2a03c0e675b83fa8dad668 (diff) |
Finally get rid of the QV4::Function pointer in the context
Change-Id: Iad6018f67faa956d385087865fca9d73419e363e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index f6a8f9426c..9728f5454c 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1222,7 +1222,8 @@ QV4::ReturnedValue Runtime::method_createMappedArgumentsObject(ExecutionEngine * Q_ASSERT(engine->currentContext()->d()->type == Heap::ExecutionContext::Type_CallContext); QV4::CallContext *c = static_cast<QV4::CallContext *>(&engine->currentStackFrame->jsFrame->context); QV4::InternalClass *ic = engine->internalClasses[EngineBase::Class_ArgumentsObject]; - return engine->memoryManager->allocObject<ArgumentsObject>(ic, engine->objectPrototype(), c, false)->asReturnedValue(); + int nFormals = engine->currentStackFrame->v4Function->nFormals; + return engine->memoryManager->allocObject<ArgumentsObject>(ic, engine->objectPrototype(), c, nFormals, false)->asReturnedValue(); } QV4::ReturnedValue Runtime::method_createUnmappedArgumentsObject(ExecutionEngine *engine) @@ -1230,7 +1231,8 @@ QV4::ReturnedValue Runtime::method_createUnmappedArgumentsObject(ExecutionEngine Q_ASSERT(engine->currentContext()->d()->type == Heap::ExecutionContext::Type_CallContext); QV4::CallContext *c = static_cast<QV4::CallContext *>(&engine->currentStackFrame->jsFrame->context); QV4::InternalClass *ic = engine->internalClasses[EngineBase::Class_StrictArgumentsObject]; - return engine->memoryManager->allocObject<ArgumentsObject>(ic, engine->objectPrototype(), c, true)->asReturnedValue(); + int nFormals = engine->currentStackFrame->v4Function->nFormals; + return engine->memoryManager->allocObject<ArgumentsObject>(ic, engine->objectPrototype(), c, nFormals, true)->asReturnedValue(); } ReturnedValue Runtime::method_loadQmlContext(NoThrowEngine *engine) |