Mercurial > projects > ldc
comparison gen/toir.cpp @ 825:a70ddd449e7d
Commented some logging that could be '''very''' long, cuts -vv output size of a gtkd gl sample down 1.2GB by 3/4.
Fixed wrong pointer type for multidimension "deep" slicing.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 04 Dec 2008 16:11:09 +0100 |
parents | 794c8af186ce |
children | f466f475b654 |
comparison
equal
deleted
inserted
replaced
824:b972fec8a5f5 | 825:a70ddd449e7d |
---|---|
1238 // (namely default initialization, int[16][16] arr; -> int[256] arr = 0;) | 1238 // (namely default initialization, int[16][16] arr; -> int[256] arr = 0;) |
1239 if (etype->ty == Tsarray) | 1239 if (etype->ty == Tsarray) |
1240 { | 1240 { |
1241 TypeSArray* tsa = (TypeSArray*)etype; | 1241 TypeSArray* tsa = (TypeSArray*)etype; |
1242 elen = DtoConstSize_t(tsa->dim->toUInteger()); | 1242 elen = DtoConstSize_t(tsa->dim->toUInteger()); |
1243 | |
1244 // in this case, we also need to make sure the pointer is cast to the innermost element type | |
1245 eptr = DtoBitCast(eptr, DtoType(tsa->nextOf()->pointerTo())); | |
1243 } | 1246 } |
1244 // for normal code the actual array length is what we want! | 1247 // for normal code the actual array length is what we want! |
1245 else | 1248 else |
1246 { | 1249 { |
1247 elen = DtoArrayLen(e); | 1250 elen = DtoArrayLen(e); |