diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-10-25 13:23:01 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-06 13:46:47 +0000 |
commit | 573ad68f8295e5b8e578bb6bad9d1ca932cccaf6 (patch) | |
tree | bbf56e4dfa74b22e576922736561e9bfb4b29825 /src/qml/compiler/qv4codegen.cpp | |
parent | 0855417be493a774c1d1a70fcf7a73ee7fed0529 (diff) |
Codegen: Set source location for return instruction
We need that in order to be able to break on the closing brace of a
function.
Change-Id: I4049f0553b01442025bda32c34fac6ce3d77246d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 8f6863b5d8..706f211ae0 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2126,6 +2126,7 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast, sourceElements(body); if (hasError || !endsWithReturn(body)) { + bytecodeGenerator->setLocation(ast->lastSourceLocation()); if (requiresReturnValue) { if (_returnAddress >= 0) { Instruction::LoadReg load; |