VMMaker wrong C translation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

VMMaker wrong C translation

Mathieu SUEN
 
Hi,

I have a wierd tranlation from VMMaker:
The Squeak code is:

(messageSelector = self splObj: SelectorNextObject) not
                ifTrue: [
                ....
                ]

the C is:

if (!(longAt((foo->specialObjectsOop + BaseHeaderSize) +  
(SelectorNextObject << ShiftForWord)))) {

}

So the foo->messageSelector have despaired.

Any idea why?

Thanks


        Mth



Reply | Threaded
Open this post in threaded view
|

Re: VMMaker wrong C translation

Hans-Martin Mosner
 
Mathieu Suen schrieb:
>
> Hi,
>
> I have a wierd tranlation from VMMaker:
> The Squeak code is:
>
> (messageSelector = self splObj: SelectorNextObject) not
You're missing parentheses here.
It should probably be
(messageSelector = (self splObj: SelectorNextObject)) not

and instead of "(condition) not ifTrue: [...]" you should perhaps write
"(condition) ifFalse: [...]".

Cheers,
Hans-Martin
Reply | Threaded
Open this post in threaded view
|

Re: VMMaker wrong C translation

Mathieu SUEN
 
ups right thank

On Jan 10, 2008, at 3:59 PM, Hans-Martin Mosner wrote:

>
> Mathieu Suen schrieb:
>>
>> Hi,
>>
>> I have a wierd tranlation from VMMaker:
>> The Squeak code is:
>>
>> (messageSelector = self splObj: SelectorNextObject) not
> You're missing parentheses here.
> It should probably be
> (messageSelector = (self splObj: SelectorNextObject)) not
>
> and instead of "(condition) not ifTrue: [...]" you should perhaps  
> write
> "(condition) ifFalse: [...]".
>
> Cheers,
> Hans-Martin

        Mth