aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilercontext_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-29 12:35:05 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-08-29 10:42:35 +0000
commit77e0602021c74b5ec2d8bd9affff5e91bf6f5ae3 (patch)
tree2054bc9a29279db1cdcdb57e414a9532b99cd818 /src/qml/compiler/qv4compilercontext_p.h
parent99d5cdad6c8580d5ef31c291b721bf6230e2502f (diff)
Fix line number mapping to work with non increasing line numbers
The old map assumed that line numbers are always increasing, something that isn't always true. So move to a format where we map blocks of bytecode to a line number instead. Change-Id: I1cd9dd1329d415122cd3d560294ef53007f879f8 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontext_p.h')
-rw-r--r--src/qml/compiler/qv4compilercontext_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h
index 796f313b5c..b796a5f149 100644
--- a/src/qml/compiler/qv4compilercontext_p.h
+++ b/src/qml/compiler/qv4compilercontext_p.h
@@ -52,6 +52,7 @@
#include "private/qv4global_p.h"
#include <private/qqmljsast_p.h>
+#include <private/qv4compileddata_p.h>
#include <QtCore/QStringList>
#include <QtCore/QDateTime>
#include <QtCore/QStack>
@@ -133,7 +134,7 @@ struct Context {
ControlFlow *controlFlow = 0;
QByteArray code;
- QVector<int> lineNumberMapping;
+ QVector<CompiledData::CodeOffsetToLine> lineNumberMapping;
int maxNumberOfArguments = 0;
bool hasDirectEval = false;