From 8776da68f53afe7e2f5cb50a242aa97a80383b43 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 13 Jun 2017 22:51:51 +0200 Subject: Implement support for conditional expressions Change-Id: Ifcd57713e1cfa9514d3955e26f739a359cdaa8e5 Reviewed-by: Erik Verbruggen Reviewed-by: Lars Knoll --- src/qml/compiler/qv4bytecodegenerator_p.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/qml/compiler/qv4bytecodegenerator_p.h') 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::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(); -- cgit v1.2.3