[Vm-dev] Re: [ANN] 7061 = Squeak 3.9 final

David Griswold David.Griswold at acm.org
Tue Sep 26 00:57:49 UTC 2006

Hi Andreas,

> -----Original Message-----
> From: vm-dev-bounces at lists.squeakfoundation.org
> [mailto:vm-dev-bounces at lists.squeakfoundation.org]On Behalf Of Andreas
> Raab
> Because it's hard. In this case, the problem is largely that you can't
> debug this stuff in the simulator because the simulator still uses
> Squeak semantics (i.e., unlimited integer arithmetic). For example, if
> you have code saying "a + b < c ifTrue:[...]" then in C this may have
> some very odd results (depending on the types of a, b, and c, as well as
> their values) whereas in the simulator the result is always the same
> (since we don't type variables).

Sorry, I'm not familiar with the Squeak VM, but why does Slang translate
into untagged C arithmetic?  To ensure the same semantic subset, why can't
you generate C that uses tagged arithmetic that traps on overflow, rather
than enlarging?  Low-bit tags are not that slow!  You could still represent
up to 512MB with 2 tag bits and signed arithmetic.  And if you need more you
just generate 64bit tagged integers, which would be fast on all new

Then you should get the same semantics in Slang and in the simulator, modulo


More information about the Vm-dev mailing list