diff options
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++; |