Re: Can't make sense of newArray# docs

2011-01-18 Thread Roman Leshchinskiy
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

Re: Can't make sense of newArray# docs

2011-01-18 Thread Max Bolingbroke
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 =

Re: Can't make sense of newArray# docs

2011-01-18 Thread Antoine Latter
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

Can't make sense of newArray# docs

2011-01-18 Thread Johan Tibell
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