aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-29 13:30:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-10-13 22:13:12 +0200
commitae49af00b59628623bc15e19974ee5af5f0121ba (patch)
tree91488d095e7a5b52bb1b8df05e56fb668039ea7b /src/qml/compiler/qv4instr_moth_p.h
parent9cfc19faf5d1ce2b9626914ab4528998b072385d (diff)
QML: Track the statement indices together with line numbers
We will need the statement indices when tracking value type references. New value type references shall only be written back in the same statement they were created in. Task-number: QTBUG-99766 Change-Id: I83f908df034e7da8ba46ccacaa29bd9d78020d20 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 75408fd348..5b6d676782 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -474,7 +474,7 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
namespace CompiledData {
-struct CodeOffsetToLine;
+struct CodeOffsetToLineAndStatement;
}
namespace Moth {
@@ -500,10 +500,13 @@ inline bool operator!=(const StackSlot &l, const StackSlot &r) { return l.stackS
// When making changes to the instructions, make sure to bump QV4_DATA_STRUCTURE_VERSION in qv4compileddata_p.h
void dumpBytecode(const char *bytecode, int len, int nLocals, int nFormals, int startLine = 1,
- const QVector<CompiledData::CodeOffsetToLine> &lineNumberMapping = QVector<CompiledData::CodeOffsetToLine>());
+ const QVector<CompiledData::CodeOffsetToLineAndStatement> &lineAndStatementNumberMapping
+ = QVector<CompiledData::CodeOffsetToLineAndStatement>());
inline void dumpBytecode(const QByteArray &bytecode, int nLocals, int nFormals, int startLine = 1,
- const QVector<CompiledData::CodeOffsetToLine> &lineNumberMapping = QVector<CompiledData::CodeOffsetToLine>()) {
- dumpBytecode(bytecode.constData(), bytecode.size(), nLocals, nFormals, startLine, lineNumberMapping);
+ const QVector<CompiledData::CodeOffsetToLineAndStatement> &lineAndStatementNumberMapping
+ = QVector<CompiledData::CodeOffsetToLineAndStatement>()) {
+ dumpBytecode(bytecode.constData(), bytecode.size(), nLocals, nFormals, startLine,
+ lineAndStatementNumberMapping);
}
union Instr