aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-13 22:51:51 +0200
committerLars Knoll <lars.knoll@qt.io>2017-06-20 09:46:45 +0000
commit8776da68f53afe7e2f5cb50a242aa97a80383b43 (patch)
tree82fbca31bf3e946bbedb94f3fbe2d370182e5c10 /src/qml/compiler/qv4bytecodegenerator_p.h
parent0cb56e810c587de469ee483bfbaafb325c871930 (diff)
Implement support for conditional expressions
Change-Id: Ifcd57713e1cfa9514d3955e26f739a359cdaa8e5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator_p.h')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator_p.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index 5c7480fc89..384fb22aa3 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -92,26 +92,33 @@ public:
addInstructionHelper(InstrMeta<InstrT>::Size, genericInstr);
}
- Q_REQUIRED_RESULT Jump addInstruction(const Instruction::Jump &data)
+ Q_REQUIRED_RESULT Jump jump()
{
+ Instruction::Jump data;
return addJumpInstruction(data);
}
- Q_REQUIRED_RESULT Jump addInstruction(const Instruction::SetExceptionHandler &data)
+ Q_REQUIRED_RESULT Jump jumpEq(const QV4::Moth::Param &cond)
{
+ Instruction::JumpEq data;
+ data.condition = cond;
return addJumpInstruction(data);
}
- Q_REQUIRED_RESULT Jump addInstruction(const Instruction::JumpEq &data)
+ Q_REQUIRED_RESULT Jump jumpNe(const QV4::Moth::Param &cond)
{
+ Instruction::JumpNe data;
+ data.condition = cond;
return addJumpInstruction(data);
}
- Q_REQUIRED_RESULT Jump addInstruction(const Instruction::JumpNe &data)
+ Q_REQUIRED_RESULT Jump setExceptionHandler()
{
+ Instruction::SetExceptionHandler data;
return addJumpInstruction(data);
}
+
unsigned newTemp();