aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator_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/qv4bytecodegenerator_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/qv4bytecodegenerator_p.h')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index 85d260ed7b..35e539fb5e 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -229,6 +229,7 @@ QT_WARNING_POP
void setLocation(const QQmlJS::SourceLocation &loc);
+ void incrementStatement();
ExceptionHandler *exceptionHandler() const {
return currentExceptionHandler;
@@ -279,6 +280,7 @@ private:
short size;
uint position;
int line;
+ int statement;
int offsetForJump;
int linkedLabel;
unsigned char packed[sizeof(Instr) + 2]; // 2 for instruction type
@@ -297,6 +299,7 @@ public:
private:
int startLine = 0;
int currentLine = 0;
+ int currentStatement = 0;
QQmlJS::SourceLocation currentSourceLocation;
std::unique_ptr<QV4::Compiler::Context::SourceLocationTable> m_sourceLocationTable;
bool debugMode = false;