diff 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
line wrap: on
line diff
--- a/gen/toir.cpp	Thu Dec 04 14:36:11 2008 +0100
+++ b/gen/toir.cpp	Thu Dec 04 16:11:09 2008 +0100
@@ -1240,6 +1240,9 @@
         {
             TypeSArray* tsa = (TypeSArray*)etype;
             elen = DtoConstSize_t(tsa->dim->toUInteger());
+
+            // in this case, we also need to make sure the pointer is cast to the innermost element type
+            eptr = DtoBitCast(eptr, DtoType(tsa->nextOf()->pointerTo()));
         }
         // for normal code the actual array length is what we want!
         else