aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-24 10:41:36 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-28 11:49:05 +0000
commit69f3deff73759a006bafa7d5595cde01d0738dde (patch)
tree7cc65ad007f1d11a3e0f6281814c45a5a093f133 /src/qml/compiler/qv4bytecodegenerator.cpp
parent7d6ebbf355fb3e8a0729d0805fe6039eebe5dfdf (diff)
Change offsets to be integer based
This is big enough for generated bytecode, and gives more uniform sizing in our instructions (everything's an int), that will simplify moving over to a compressed instruction stream. Change-Id: Ieb13c5db84348f11c3297c08dca640bb9ec5f224 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator.cpp')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp
index cae984a253..3c28f6a719 100644
--- a/src/qml/compiler/qv4bytecodegenerator.cpp
+++ b/src/qml/compiler/qv4bytecodegenerator.cpp
@@ -97,9 +97,9 @@ void BytecodeGenerator::finalize(Compiler::Context *context)
int offset = instructionOffsets.at(j.instructionIndex) + j.offset;
// qDebug() << "offset data is at" << offset;
char *c = code.data() + offset;
- ptrdiff_t linkedInstructionOffset = instructionOffsets.at(linkedInstruction) - offset;
+ int linkedInstructionOffset = instructionOffsets.at(linkedInstruction) - offset;
// qDebug() << "linked instruction" << linkedInstruction << "at " << instructionOffsets.at(linkedInstruction);
- memcpy(c, &linkedInstructionOffset, sizeof(ptrdiff_t));
+ memcpy(c, &linkedInstructionOffset, sizeof(int));
}
context->code = code;