aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-01-05 14:55:44 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-01-07 20:14:41 +0000
commitd1e7e5cd7d5eb601541dcc4860ce11a63048d35d (patch)
tree4b642bda403cbc3e50df2ca4a5a0ab9c10eb88f1 /src/qml/compiler
parente8b8de4460235c458ab5c8e3249982628e9541bd (diff)
Minor cleanup in byte code instruction compression
Once we have identified that an instruction needs to be encoded in wide format, we do not inspect the remaining arguments any further. Change-Id: I0164acedc68b28bd95f9aab0c0fd1702a59de90d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp
index 03105d2b71..0becabe95f 100644
--- a/src/qml/compiler/qv4bytecodegenerator.cpp
+++ b/src/qml/compiler/qv4bytecodegenerator.cpp
@@ -82,8 +82,10 @@ void BytecodeGenerator::packInstruction(I &i)
Wide
} width = Normal;
for (int n = 0; n < nMembers; ++n) {
- if (width == Normal && (static_cast<qint8>(instructionsAsInts[n]) != instructionsAsInts[n]))
+ if (width == Normal && (static_cast<qint8>(instructionsAsInts[n]) != instructionsAsInts[n])) {
width = Wide;
+ break;
+ }
}
char *code = i.packed;
switch (width) {