diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2011-07-25 08:31:21 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-30 13:18:28 +0200 |
commit | 2b4882d0186780b84cbc2a6c0614a0d084567e3f (patch) | |
tree | e3654cf4b3c83cf5b6f8cd44901add7d7bf698ae /src/declarative/qml/v4/qdeclarativev4ir_p.h | |
parent | bcf5af7423dc496fd70534f0b32cd2ace3a1a5c8 (diff) |
Merge IR::Module and IR::Function.
V4 compiles one function at time. There is no reson to keep
IR::Module and IR::Function as separate classes.
Change-Id: Ia6bf971d0d499b14847c3ca725f9cdf5c7e3916c
Reviewed-on: http://codereview.qt.nokia.com/3784
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/declarative/qml/v4/qdeclarativev4ir_p.h')
-rw-r--r-- | src/declarative/qml/v4/qdeclarativev4ir_p.h | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/declarative/qml/v4/qdeclarativev4ir_p.h b/src/declarative/qml/v4/qdeclarativev4ir_p.h index 0c93fbbfd5..e79a289472 100644 --- a/src/declarative/qml/v4/qdeclarativev4ir_p.h +++ b/src/declarative/qml/v4/qdeclarativev4ir_p.h @@ -78,7 +78,6 @@ namespace IR { struct BasicBlock; struct Function; -struct Module; struct Stmt; struct Expr; @@ -479,17 +478,19 @@ struct Ret: Stmt { }; struct Function { - Module *module; - QString name; - int tempCount; + QDeclarativePool *pool; QVarLengthArray<BasicBlock *, 8> basicBlocks; + int tempCount; - inline BasicBlock *i(BasicBlock *block) { basicBlocks.append(block); return block; } + Function(QDeclarativePool *pool) + : pool(pool), tempCount(0) {} - Function(Module *module, const QString &name): module(module), name(name), tempCount(0) {} ~Function(); BasicBlock *newBasicBlock(); + QString *newString(const QString &text); + + inline BasicBlock *i(BasicBlock *block) { basicBlocks.append(block); return block; } virtual void dump(QTextStream &out); }; @@ -550,19 +551,6 @@ struct BasicBlock { virtual void dump(QTextStream &out); }; -struct Module { - QDeclarativePool *pool; - QVarLengthArray<Function *, 4> functions; - - Module(QDeclarativePool *pool); - ~Module(); - - QString *newString(const QString &text); - Function *newFunction(const QString &name = QString()); - - virtual void dump(QTextStream &out); -}; - #ifdef DEBUG_IR_STRUCTURE struct IRDump : public ExprVisitor, public StmtVisitor |