aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4jsir_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2015-01-09 14:17:31 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-12 19:19:40 +0100
commit327af26d8d5421983a10693bb9039de31a5788be (patch)
tree93e56a19665f8350a727b912ea0f8b7097f44377 /src/qml/compiler/qv4jsir_p.h
parentf6e1e92c2ec0279c31d354f5fdf187f09223a705 (diff)
V4 IR: move the MemberResolver out of IR::Temp.
Temps are copied around a lot. This patch reduces the size by storing a single pointer to the resolver. Change-Id: I074b8b729fce310542cf4697ef42107085b304b3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r--src/qml/compiler/qv4jsir_p.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 41de23809c..c6a192e14a 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -368,23 +368,25 @@ struct Q_AUTOTEST_EXPORT Temp: Expr {
StackSlot
};
+ // Used when temp is used as base in member expression
+ MemberExpressionResolver *memberResolver;
+
unsigned index : 28;
- unsigned kind : 3;
unsigned isReadOnly : 1;
- // Used when temp is used as base in member expression
- MemberExpressionResolver memberResolver;
+ unsigned kind : 3;
Temp()
- : index((1 << 28) - 1)
- , kind(Invalid)
+ : memberResolver(0)
+ , index((1 << 28) - 1)
, isReadOnly(0)
+ , kind(Invalid)
{}
void init(unsigned kind, unsigned index)
{
- this->kind = kind;
this->index = index;
this->isReadOnly = false;
+ this->kind = kind;
}
bool isInvalid() const { return kind == Invalid; }