[Pharo-project] latest build yields stack trace running #cleanUpForProduction
Mariano Martinez Peck
marianopeck at gmail.com
Wed Jan 18 12:44:58 CET 2012
On Wed, Jan 18, 2012 at 12:25 PM, Henrik Johansen <
henrik.s.johansen at veloxit.no> wrote:
> On Jan 18, 2012, at 12:14 47PM, Mariano Martinez Peck wrote:
> > Well....it seems I found the problem. And in fact, it has alredy been
> solved by Levente in Squeak...I waste so many hours...and the fix was
> > So, can you try changing to
> > sizeFor: numberOfElements
> > "Return the minimum capacity of a dictionary that can hold
> numberOfElements elements. At least 25% of the array must be empty and the
> return value must be a power of 2."
> > ^(numberOfElements * 4 // 3) asLargerPowerOfTwo max: 1
> > And see if it works? it works here…
> It should not be necessary.
> The real bug is that Integer >> isPowerOfTwo does not check for the edge
> 0 isPowerOfTwo true
> A small fix:
> Integer >> #isPowerOfTwo
> "Return true if the receiver is an integral power of two."
> ^ self ~= 0 and: [(self bitAnd: self-1) = 0]
now...even if that's correct, do you think there could be side effect in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-project