Mercurial > projects > ldc
comparison gen/irstate.cpp @ 334:20446d22f832 trunk
[svn r355] Get rid of IRState::exps and topexp.
author | ChristianK |
---|---|
date | Sat, 12 Jul 2008 15:43:13 +0200 |
parents | 0d52412d5b1a |
children | 017ca8645a1f |
comparison
equal
deleted
inserted
replaced
333:f7190d9eb70c | 334:20446d22f832 |
---|---|
93 { | 93 { |
94 assert(!structs.empty() && "Struct vector is empty!"); | 94 assert(!structs.empty() && "Struct vector is empty!"); |
95 return structs.back(); | 95 return structs.back(); |
96 } | 96 } |
97 | 97 |
98 IRExp* IRState::topexp() | |
99 { | |
100 return exps.empty() ? NULL : &exps.back(); | |
101 } | |
102 | |
103 IRScope& IRState::scope() | 98 IRScope& IRState::scope() |
104 { | 99 { |
105 assert(!scopes.empty()); | 100 assert(!scopes.empty()); |
106 return scopes.back(); | 101 return scopes.back(); |
107 } | 102 } |
171 { | 166 { |
172 IRBuilder& b = state->scope().builder; | 167 IRBuilder& b = state->scope().builder; |
173 assert(b.GetInsertBlock() != NULL); | 168 assert(b.GetInsertBlock() != NULL); |
174 return &b; | 169 return &b; |
175 } | 170 } |
176 | |
177 ////////////////////////////////////////////////////////////////////////////////////////// | |
178 | |
179 IRExp::IRExp() | |
180 { | |
181 e1 = e2 = NULL; | |
182 v = NULL; | |
183 } | |
184 | |
185 IRExp::IRExp(Expression* l, Expression* r, DValue* val) | |
186 { | |
187 e1 = l; | |
188 e2 = r; | |
189 v = val; | |
190 } |