From ef4b896d293ef8bb85dbf54a6049ed80bfdd19f8 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 31 Aug 2017 13:43:39 +0200 Subject: Don't emit bytecode just to set the thisObject to undefined The stubs doing the calls often overwrite the value, and can in any case do it more efficiently. Change-Id: I0bb2fb3dcc34e805e0a4a178db02f99816d5cf46 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/compiler/qv4codegen.cpp') diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index deda792cc6..9bc6633fec 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1236,8 +1236,8 @@ Moth::StackSlot Codegen::pushArgs(ArgumentList *args) (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Function); (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Context); (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::Accumulator); -#endif (void) Reference::fromConst(this, QV4::Encode::undefined()).storeOnStack(calldata + CallData::This); +#endif (void) Reference::fromConst(this, QV4::Encode(argc)).storeOnStack(calldata + CallData::Argc); Q_STATIC_ASSERT(sizeof(CallData) == 6 * sizeof(Value)); -- cgit v1.2.3