++ mystery solved!!!!
Alan Grimes
alangrimes at starpower.net
Thu Apr 8 01:19:44 UTC 2004
om
You may recall that I noticed that the compiler was emitting "i += 1"
instead of "i++" in
for loops and elsewhere.
When I turned my attention from the interpreter (which I consider mostly
complete at this time, anyone wanting to test/synch up with my changes,
now would be a good time), I started looking for anomolies in the C code
and then at the compiler to see what caused them.
The compiler _WAS_ coded to emit "#to:do:" as ++ _HOWEVER_, the
*smalltalk* compiler sees #to:do: as a *macro* which is automatically
translated to #to:by:do: with an increment of 1.
Having discovered this, I edited the C compiler code for #to:by:do: to
detect a value of +/-1 and emit ++ or -- accordingly.
My binary is now about 16 bytes shorter so it did do some good! =))))
The GC problem I mentioned earlier seems to have been caused by my
attempt to do bitwise manipulations on word-variables. The mechanism
behind this is far from clear.
More information about the Squeak-dev
mailing list
|