On 18/01/2011, at 22:18, Johan Tibell wrote:
> The docs for newArray# states:
>
> "Create a new mutable array of specified size (in bytes), in the
> specified state thread, with each element containing the specified
> initial value."
The docs are wrong.
> I'm trying to implement
> the following
On 18 January 2011 22:18, Johan Tibell wrote:
> Why is the size in bytes?
I think the docs are wrong. The code for newArray# (in PrimOps.cmm)
interprets n as a size in words:
{{{
stg_newArrayzh
{
W_ words, n, init, arr, p, size;
/* Args: R1 = words, R2 = initialisation value */
n =
On Tue, Jan 18, 2011 at 4:18 PM, Johan Tibell wrote:
> Hi,
>
> The docs for newArray# states:
>
> "Create a new mutable array of specified size (in bytes), in the
> specified state thread, with each element containing the specified
> initial value."
>
> Why is the size in bytes? Is Array# meant to
Hi,
The docs for newArray# states:
"Create a new mutable array of specified size (in bytes), in the
specified state thread, with each element containing the specified
initial value."
Why is the size in bytes? Is Array# meant to be used both for boxed
and unboxed values? For arrays of boxed value