>
>>>
>> Hi Levente. Thanks for the answer, but I didn't understand. Which code do
>> you mean?
>>
>> If you refer to:
>>
>> [ true ] whileTrue: [ 1+1 ]
>>
>> I am sending the message whileTrue: to BlockClosure and the message + to
>> 1.
>> So, I don't understand.
>>
>
> In theory yes, but in practice no. Just look at the generated bytecode:
>
>
ahhhhh ;)


> 13 <71> pushConstant: true
> 14 <9D> jumpFalse: 21
> 15 <76> pushConstant: 1
> 16 <76> pushConstant: 1
> 17 <B0> send: +
> 18 <87> pop
> 19 <A3 F8> jumpTo: 13
> 21 <78> returnSelf
>
> As you can see #whileTrue: totally disappeared, no message sends. There's a
> send for #+, but that's a B0 bytecode which will not do a real message send,
> because both the receiver and the argument is a SmallInteger.
> Therefore your code won't send any messages.
>


Ok...I got it. But now I tested with this:

[true] whileTrue: [
Transcript open.
Transcript show: 'mariano'.
Transcript close.
]

With bytecodes:

33 <71> pushConstant: true
34 <AC 0C> jumpFalse: 48
36 <41> pushLit: Transcript
37 <D0> send: open
38 <87> pop
39 <41> pushLit: Transcript
40 <23> pushConstant: 'mariano'
41 <E2> send: show:
42 <87> pop
43 <41> pushLit: Transcript
44 <D4> send: close
45 <87> pop
46 <A3 F1> jumpTo: 33
48 <78> returnSelf


Now it should work, isn't it ?   However, I still it doesn't interrupt the
process :(

Thanks for the help levente.

Mariano


>
>
> Levente
>
>
>
>> Btw, you can turn CPUWatcher on from the Process Browser and see the CPU
>>
>>> usage of processes.
>>>
>>>
>>>  Yes, I tried this before but it happened the same....I tried to test it,
>> evaluating
>> [ true ] whileTrue: [ 1+1 ]  but it was not interrupted.
>>
>> I also tried to click several times in the world but with no luck.
>>
>> Thanks
>>
>> Mariano
>>
>>
>>
>>> Levente
>>>
>>>
>>>  Cheers
>>>>
>>>> Mariano
>>>>
>>>>
>>>>  _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project@lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to