diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-16 22:50:50 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-06-20 10:04:19 +0000 |
commit | a14407ca599eae8e1b7a119bdba082abe51a17f2 (patch) | |
tree | c73dec21ea547ada818d269cc016db2b82a7eef7 /src/qml/compiler/qv4bytecodegenerator.cpp | |
parent | 5da34373d46d17f2950a4beeb3b78d6edcb208e9 (diff) | |
download | qtdeclarative-a14407ca599eae8e1b7a119bdba082abe51a17f2.tar.gz |
Get back some line number information
Change-Id: I7d7845a9d8d147bd363c0f60df41066fab355272
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator.cpp')
-rw-r--r-- | src/qml/compiler/qv4bytecodegenerator.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp index 6ccdeef777..ed58833b25 100644 --- a/src/qml/compiler/qv4bytecodegenerator.cpp +++ b/src/qml/compiler/qv4bytecodegenerator.cpp @@ -39,11 +39,22 @@ #include <private/qv4bytecodegenerator_p.h> #include <private/qv4jsir_p.h> +#include <private/qqmljsastfwd_p.h> QT_USE_NAMESPACE using namespace QV4; using namespace Moth; +void BytecodeGenerator::setLocation(const QQmlJS::AST::SourceLocation &loc) +{ + if (static_cast<int>(loc.startLine) == currentLine) + return; + currentLine = static_cast<int>(loc.startLine); + Instruction::Line line; + line.lineNumber = currentLine; + addInstruction(line); +} + unsigned BytecodeGenerator::newTemp() { int t = function->currentTemp++; |