[Vm-dev] urgent info required on Slang's shift treatment...

Andreas Raab andreas.raab at gmx.de
Tue Mar 3 21:20:11 UTC 2009


Don't even think about it.

Cheers,
   - Andreas

Eliot Miranda wrote:
>  
> 
> 
> ------------------------------------------------------------------------
> 
> Hi All,
> 
>     I'm being bitten by Slang's treatment of bitShift: & >>.  In both 
> cases (generateBitShift:on:indent: & generateShiftRight:on:indent:) 
> Slang generates an unsigned shift by explicitly casting the shifted 
> expression to usqInt.  I can understand the benefit of having an 
> unsigned shift.  But there are times when one really needs a signed 
> shift.  Further, the Smalltalk versions of both bitShift: and >> are 
> signed shifts.
> 
> Dare I change e.g. generateShiftRight:on:indent: to leave the expression 
> alone and generate either a signed or an unsigned shift based on the 
> variable's declaration?  Or must I live with a maddening cCode: 
> '(signed)' inSmalltalk: [] carbuncle?
> 
> E.


More information about the Vm-dev mailing list