aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator_p.h
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/qv4bytecodegenerator_p.h
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/qv4bytecodegenerator_p.h')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index 78ce3624ea..dca5771356 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -279,7 +279,7 @@ private:
int line;
int offsetForJump;
int linkedLabel;
- char packed[sizeof(Instr) + 2]; // 2 for instruction and prefix
+ unsigned char packed[sizeof(Instr) + 2]; // 2 for instruction type
};
void compressInstructions();