comparison ir/ir.h @ 1148:3d1b16dabd25

Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Fri, 27 Mar 2009 21:50:32 +0100
parents dbe4af57b240
children 46f6365a50d7
comparison
equal deleted inserted replaced
1147:dbe4af57b240 1148:3d1b16dabd25
1 // this head contains stuff used by all the IR 1 // this head contains stuff used by all the IR
2 2
3 #ifndef LDC_IR_IR_H 3 #ifndef LDC_IR_IR_H
4 #define LDC_IR_IR_H 4 #define LDC_IR_IR_H
5 5
6 #include <deque>
7
6 #include "ir/irforw.h" 8 #include "ir/irforw.h"
7 #include "root.h" 9 #include "root.h"
8 10
9 struct IRState; 11 struct IRState;
12 struct IrFunction;
10 13
11 struct IrBase : Object 14 struct IrBase : Object
12 { 15 {
13 virtual ~IrBase() {} 16 virtual ~IrBase() {}
14 }; 17 };
15 18
16 struct Ir 19 struct Ir
17 { 20 {
18 Ir() : irs(NULL) {} 21 Ir();
19 22
20 void setState(IRState* p) { irs = p; } 23 void setState(IRState* p) { irs = p; }
21 IRState* getState() { return irs; } 24 IRState* getState() { return irs; }
22 25
26 void addFunctionBody(IrFunction* f);
27 void emitFunctionBodies();
28
23 private: 29 private:
24 IRState* irs; 30 IRState* irs;
31
32 std::deque<IrFunction*> functionbodies;
25 }; 33 };
26 34
27 #endif 35 #endif