aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-12 16:07:27 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-06-19 13:35:47 +0000
commit4d329ef984d0f64b9446321ef63fc5a70cd103cd (patch)
tree4f63032d19c28dcf7cd263924e806fb8f2cf11c7 /src/qml/compiler/qv4bytecodegenerator.cpp
parent2c0db96b0ea1b8d4daa5d0fda8b9b22270b5ab4b (diff)
Add the push instruction required to set up the temps
And a commented out finalize() call to the bytecodegenerator Change-Id: Iaaf8981ee658e19b6816589d4340a8e5744764b7 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator.cpp')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp
index f00a793a0b..71288b814c 100644
--- a/src/qml/compiler/qv4bytecodegenerator.cpp
+++ b/src/qml/compiler/qv4bytecodegenerator.cpp
@@ -54,10 +54,14 @@ unsigned BytecodeGenerator::newTemp()
QByteArray BytecodeGenerator::finalize()
{
- // ### prologue
- // ## push(tempcount)
- // content
QByteArray code;
+
+ Instruction::Push push;
+ push.instructionType = Instr::Push;
+ push.value = quint32(function->tempCount);
+ code.append(reinterpret_cast<const char *>(&push), InstrMeta<Instr::Push>::Size);
+
+ // content
for (const auto &i : qAsConst(instructions)) {
code.append(reinterpret_cast<const char *>(&i.instr), i.size);
}