Mercurial > projects > ldc
comparison dmd/optimize.c @ 94:61615fa85940 trunk
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
Added support for array .sort and .reverse properties.
Fixed some bugs with pointer arithmetic.
Disabled some DMD AST optimizations that was messing things up, destroying valuable information.
Added a KDevelop project file, this is what I use for coding LLVMDC now :)
Other minor stuff.
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:32:46 +0100 |
parents | 70d6113eeb8c |
children | 2b72433d5c8c |
comparison
equal
deleted
inserted
replaced
93:08508eebbb3e | 94:61615fa85940 |
---|---|
207 e = ex->copy(); | 207 e = ex->copy(); |
208 e->type = type; | 208 e->type = type; |
209 } | 209 } |
210 return e; | 210 return e; |
211 } | 211 } |
212 #if !IN_LLVM | |
212 if (e1->op == TOKvar) | 213 if (e1->op == TOKvar) |
213 { VarExp *ve = (VarExp *)e1; | 214 { VarExp *ve = (VarExp *)e1; |
214 if (!ve->var->isOut() && !ve->var->isRef() && | 215 if (!ve->var->isOut() && !ve->var->isRef() && |
215 !ve->var->isImportedSymbol()) | 216 !ve->var->isImportedSymbol()) |
216 { | 217 { |
238 e->type = type; | 239 e->type = type; |
239 return e; | 240 return e; |
240 } | 241 } |
241 } | 242 } |
242 } | 243 } |
244 #endif | |
243 return this; | 245 return this; |
244 } | 246 } |
245 | 247 |
246 Expression *PtrExp::optimize(int result) | 248 Expression *PtrExp::optimize(int result) |
247 { | 249 { |