who ever performed bit logic on large negative integer?
bonzini at gnu.org
Sat Jan 26 15:07:50 UTC 2008
> There should be a comment somewhere (Integer class comment?) explicitly
> stating, that you cannot rely on two complement semantics for
> LargeNegativeIntegers regarding bit logic (bit logic restricted to
> positive Integers is correct).
That's absurd IMHO.
> I fear, changing the fundamental design decision to use magnitude
> representation for LargeNegativeIntegers - e.g. by introducing some kind
> of two complement representation - would imply a lot of work...
It is possible to work out bitwise ops on magnitude representation, by
computing the two's complement representation on the fly in the
primitives or in the fallback Smalltalk code.
More information about the Squeak-dev