summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-31 13:43:39 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-01 12:31:08 +0000
commitef4b896d293ef8bb85dbf54a6049ed80bfdd19f8 (patch)
tree553fd986430c927db082568123ba3b126dfb8aa6 /src/qml/compiler/qv4codegen.cpp
parent37195fe928494cb192220f115254bfe084cc3ab8 (diff)
downloadqtdeclarative-ef4b896d293ef8bb85dbf54a6049ed80bfdd19f8.tar.gz
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
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));