JPEGReadWriter, Differences between Squeak and VisualWorks

Andres Valloud sqrmax at cvtci.com.ar
Sun May 2 04:42:29 UTC 1999


Hi.

> > These selectors, #>> and #<<, should be deleted from Squeak...
> I put these methods into Squeak

Ouch!!!... :) oops, sorry!

> to assist code generation for the VM and associated primitives.  The C 
> translator has to compile a run-time test for the sign of the shift count in 
> the case of bitShift:, so we use >> and << for speed where this is known 
> (nearly everywhere).

Ahhhhhhh! Yes... now the picture is clear.

> Clearly, this information should be documented in those methods, along with 
> the fact that the primitive bitShift: is faster in Squeak.

Hmmmmm... is the JPEG reader converted to C too? Besides >> and <<, today I
found a method in the JPEG reader with something like

(aNumber to: someOther by: yetAnother) do: aBlock

.... errr... now I don't know what to say! :)))... another little thing. Would it
be ok if Float>>#rounded was rendered into a bytecode? Most FPUs should have a
round-to-integer instruction.

Andres.





More information about the Squeak-dev mailing list