
22 Aug
2011
22 Aug
'11
3:43 a.m.
On Mon, Aug 22, 2011 at 5:55 AM, Edward Z. Yang
stg_newArrayzh in rts/PrimOps.cmm doesn't appear to give any indication, so this might be a good patch to add. But I'm curious: what would allocating Array#s of size 0 do? Null pointers? That sounds dangerous...
I would imagine that a zero sized array would be a StgArrPtrs header with its size field set to 0. It's not a very useful thing to have, I admit. If someone (Simon?) can confirm that we don't intend to support zero-length array I'll push a patch that adds a comment. Johan