aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-07-02 13:24:03 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-03 11:18:52 +0000
commit386036e23b67d6aa6d10ff166a1904f18c304a8a (patch)
treebf4a22cceb6df14685ea85bc94fe91ff02b94436 /src/qml/compiler/qv4instr_moth.cpp
parent1879525721fa348c18cdbc0ffb3830d689f06933 (diff)
Change the instruction encoding for the bytecode
Change the encoding, so that even instructions are short ones, odd instructions long. This implies that the lowest bit encodes whether an instruction is short or long (1 vs 4 byte encoded). This prepares for allowing us to extend the totoal number of instructions beyond 128. Change-Id: I4732e7241d3593b24ad25cd69555edc25f38d2f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth.cpp')
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 5621b456d5..6773f97c8b 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -46,7 +46,7 @@ using namespace QV4::Moth;
int InstrInfo::size(Instr::Type type)
{
-#define MOTH_RETURN_INSTR_SIZE(I) case Instr::Type::I: return InstrMeta<int(Instr::Type::I)>::Size;
+#define MOTH_RETURN_INSTR_SIZE(I) case Instr::Type::I: case Instr::Type::I##_Wide: return InstrMeta<int(Instr::Type::I)>::Size;
switch (type) {
FOR_EACH_MOTH_INSTR(MOTH_RETURN_INSTR_SIZE)
}