On 15 February 2011 19:59, Eliot Miranda <
eliot.miranda@gmail.com> wrote:
>
>
> On Mon, Feb 14, 2011 at 11:00 PM, St�phane Ducasse
> <
stephane.ducasse@inria.fr> wrote:
>>
>> Eliot
>>
>> you use caseOf: for the generation of C in Slang and VM maker.
>> Now this means that
>> � � � �- it does not need to be inlined
>
> No. �If it is not inlined the simulator will go *much* slower. �e.g.
> CogVMSimulatorLSB>>byteAt: byteAddress
> | lowBits long |
> lowBits := byteAddress bitAnd: 3.
> long := self longAt: byteAddress - lowBits.
> ^(lowBits caseOf: {
> [0] -> [ long ].
> [1] -> [ long bitShift: -8 �].
> [2] -> [ long bitShift: -16 ].
> [3] -> [ long bitShift: -24 ]
> }) bitAnd: 16rFF
>
so why not put it: