aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4jsir_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-06-27 13:40:24 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-07-23 11:59:44 +0200
commit07bee265d7ee4d0e8874697b488b249d79110298 (patch)
treee9851fdfa27ded324e7a94df1e4f083f5b253aa0 /src/qml/compiler/qv4jsir_p.h
parent661649edf1cd0448b4276fbf6e0a97fd5ec8c792 (diff)
V4 IR: copy arguments to temps at function start.
When arguments cannot "escape" from the current context, and when the arguments array is not used, actual arguments can be treated the same as temporaries instead of memory locations. This has the benefits that they are subject to the same optimizations, and type deduction can assume that the value/type didn't change since its assignment. Another effect is that the values can be kept in registers, and loads from the stack take only 1 indirect load instead of 2 (from the formals array). Change-Id: I209da7991ec5d903b3c5acdbcaf6b1cc67502520 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r--src/qml/compiler/qv4jsir_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 4bff15ddce..606313d0c1 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -820,6 +820,7 @@ public:
void appendStatement(Stmt *statement);
void prependStatement(Stmt *stmt);
+ void prependStatements(const QVector<Stmt *> &stmts);
void insertStatementBefore(Stmt *before, Stmt *newStmt);
void insertStatementBefore(int index, Stmt *newStmt);
void insertStatementBeforeTerminator(Stmt *stmt);