diff options
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 2b4168e155..e57b0a27dd 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2059,6 +2059,9 @@ void Codegen::endVisit(CallExpression *ast) void Codegen::handleCall(Reference &base, Arguments calldata, int slotForFunction, int slotForThisObject, bool optional) { + if (base.sourceLocation.isValid()) + bytecodeGenerator->setLocation(base.sourceLocation); + //### Do we really need all these call instructions? can's we load the callee in a temp? if (base.type == Reference::Member) { if (!disable_lookups && useFastLookups) { @@ -2492,7 +2495,7 @@ bool Codegen::visit(FieldMemberExpression *ast) } setExprResult(Reference::fromMember( - base, ast->name.toString(), ast->firstSourceLocation(), + base, ast->name.toString(), ast->lastSourceLocation(), ast->isOptional ? m_optionalChainLabels.take(ast) : Moth::BytecodeGenerator::Label(), label.has_value() ? label.value() : Moth::BytecodeGenerator::Label())); |