aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-02-10 17:04:32 +0100
committerLars Knoll <lars.knoll@qt.io>2018-04-25 17:49:09 +0000
commitb59b727035c4c1a4d235432cc67e5d89d3a24cd3 (patch)
treeb452f39eab452a8a472dfc5c9b7e89ab4a354c1f /src/qml/compiler/qv4bytecodegenerator_p.h
parent2683a22364f742e3809b6c48570b0b4aaf37b31f (diff)
ES6: add support for default arguments for function parameters
The parser can also handle rest parameters correctly, this will however require some additional work in the runtime to support it correctly. Change-Id: Ib6f4d27683774966b2d2aac075494d2f5066d2a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator_p.h')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index e69f2cd310..9bd9d82e0d 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -181,6 +181,12 @@ public:
return addJumpInstruction(data);
}
+ Q_REQUIRED_RESULT Jump jumpNotUndefined()
+ {
+ Instruction::JumpNotUndefined data;
+ return addJumpInstruction(data);
+ }
+
void jumpStrictEqual(const StackSlot &lhs, const Label &target)
{
Instruction::CmpStrictEqual cmp;