aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator_p.h')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator_p.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index d6b4d1b06e..d28d16ff5f 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -236,27 +236,21 @@ private:
friend struct Label;
friend struct ExceptionHandler;
- int addInstructionHelper(Moth::Instr::Type type, const Instr &i, int offsetOfOffset = -1) {
- int pos = instructions.size();
- instructions.append({type, 0, 0, currentLine, offsetOfOffset, -1, { i } });
- return pos;
- }
+ int addInstructionHelper(Moth::Instr::Type type, const Instr &i, int offsetOfOffset = -1);
struct I {
Moth::Instr::Type type;
- uint size;
+ short size;
uint position;
int line;
int offsetForJump;
int linkedLabel;
- union {
- Instr instr;
- char packed[sizeof(Instr) + 2]; // 2 for instruction and prefix
- };
+ char packed[sizeof(Instr) + 2]; // 2 for instruction and prefix
};
void compressInstructions();
void packInstruction(I &i);
+ void adjustJumpOffsets();
QVector<I> instructions;
QVector<int> labels;