aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-06-14 12:21:45 +0200
committerLars Knoll <lars.knoll@qt.io>2017-06-20 09:50:38 +0000
commit078a1e55d92f43af200e8bf6ee1bcf9d84a88f1b (patch)
tree90ccb16f705a344fc043426f71326e69ea58b04e /src/qml/compiler/qv4codegen.cpp
parent08c07217d7c41de127a5ad51582f7957f02f6029 (diff)
Do not initialize return value temp
The Push instruction will initialize all temporaries to undefined, so the generated bytecode doesn't need to do that. Change-Id: I4e8340ea4d47f078404fbb6720cf46a614f33b14 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index e99279df04..4df09453b5 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2440,11 +2440,6 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
qSwap(_returnAddress, returnAddress);
qSwap(_scopeAndFinally, scopeAndFinally);
- {
- auto retTemp = Reference::fromTemp(this, _returnAddress);
- retTemp.store(Reference::fromConst(this, Encode::undefined()));
- }
-
for (FormalParameterList *it = formals; it; it = it->next) {
_function->RECEIVE(it->name.toString());
}