From 43fe684d42d90dd76d7d6c946a37ec0002f703a8 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sun, 11 Jan 2015 21:11:29 +0100 Subject: Move Stmt::d to Phi::d Phi is the only thing using it. Change-Id: I2b6706884d9e41cc26632a6ad72281b391960f4f Reviewed-by: Erik Verbruggen --- src/qml/compiler/qv4jsir_p.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/qml/compiler/qv4jsir_p.h') 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 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 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 { -- cgit v1.2.3