Mercurial > projects > ldc
diff gen/toir.cpp @ 591:e6bcc4d9e5ff
Add _d_newarrayvT and _d_newarraymvT to create arrays without initialization.
Adjust DtoNewDynArray to use DtoArrayInit for initialization of new arrays.
Make Type::tvoid->defaultInit() not error.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 14 Sep 2008 10:13:50 +0200 |
parents | 23538d0f0d5b |
children | 5fb7ed0ac580 |
line wrap: on
line diff
--- a/gen/toir.cpp Fri Sep 12 13:11:32 2008 +0200 +++ b/gen/toir.cpp Sun Sep 14 10:13:50 2008 +0200 @@ -1452,7 +1452,7 @@ { DValue* sz = ((Expression*)arguments->data[0])->toElem(p); // allocate & init - return DtoNewDynArray(newtype, sz, true); + return DtoNewDynArray(loc, newtype, sz, true); } else { @@ -1460,7 +1460,7 @@ std::vector<DValue*> dims(ndims); for (size_t i=0; i<ndims; ++i) dims[i] = ((Expression*)arguments->data[i])->toElem(p); - return DtoNewMulDimDynArray(newtype, &dims[0], ndims, true); + return DtoNewMulDimDynArray(loc, newtype, &dims[0], ndims, true); } } // new static array