aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4jsir_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2015-01-11 21:11:29 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-01-23 13:29:57 +0100
commit43fe684d42d90dd76d7d6c946a37ec0002f703a8 (patch)
treea6b06bc39509ae9b051d11420bb7177f495e6e4a /src/qml/compiler/qv4jsir_p.h
parentfc2da305171eb913eb5f3acdbe4ebd39cca2d1ac (diff)
Move Stmt::d to Phi::d
Phi is the only thing using it. Change-Id: I2b6706884d9e41cc26632a6ad72281b391960f4f Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r--src/qml/compiler/qv4jsir_p.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index c6a192e14a..4f31d848d0 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -602,16 +602,11 @@ struct Member: Expr {
};
struct Stmt {
- struct Data {
- QVector<Expr *> incoming; // used by Phi nodes
- };
-
enum { InvalidId = -1 };
- Data *d;
QQmlJS::AST::SourceLocation location;
- explicit Stmt(int id): d(0), _id(id) {}
+ explicit Stmt(int id): _id(id) {}
virtual ~Stmt()
{
@@ -635,10 +630,6 @@ struct Stmt {
private: // For memory management in BasicBlock
friend struct BasicBlock;
- void destroyData() {
- delete d;
- d = 0;
- }
private:
friend struct Function;
@@ -735,11 +726,21 @@ struct Ret: Stmt {
struct Phi: Stmt {
Temp *targetTemp;
+ struct Data {
+ QVector<Expr *> incoming; // used by Phi nodes
+ };
- Phi(int id): Stmt(id) {}
+ Data *d;
+
+ Phi(int id): Stmt(id), d(0) {}
virtual void accept(StmtVisitor *v) { v->visitPhi(this); }
virtual Phi *asPhi() { return this; }
+
+ void destroyData() {
+ delete d;
+ d = 0;
+ }
};
struct Q_QML_PRIVATE_EXPORT Module {