aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-12-04 13:09:05 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-12-04 13:19:43 +0100
commitf61271a9c55a198c715330c5c5805d298644b6c9 (patch)
treeb68a7fd2a2747689f366b0a944895830e43afa6f /src/qml/compiler
parente070e571d184b4f6eb1f065009aac0779d004f29 (diff)
V4: Add reset() method to the byte code handler
This is necessary if you want to parse the same byte code in multiple passes. Change-Id: I8d3e9739b7cb3682d0f1d26e675ead8b7ce66a93 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4bytecodehandler_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4bytecodehandler_p.h b/src/qml/compiler/qv4bytecodehandler_p.h
index f1e7c99447..c9ceb7ddce 100644
--- a/src/qml/compiler/qv4bytecodehandler_p.h
+++ b/src/qml/compiler/qv4bytecodehandler_p.h
@@ -96,6 +96,7 @@ public:
virtual ~ByteCodeHandler();
void decode(const char *code, uint len);
+ void reset() { _currentOffset = _nextOffset = 0; }
int currentInstructionOffset() const { return _currentOffset; }
int nextInstructionOffset() const { return _nextOffset; }