More from TheTrunk

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

More from TheTrunk

Alexandre Bergel
http://code.google.com/p/pharo/issues/detail?id=1663

SLICE-IntervalFix-FromTrunk-Alexandre_Bergel.1 in the InBox

If you fill an issue for the first time, please read "How to report  
bugs"
at http://www.pharo-project.org/community/issue-tracking

Pharo core version: 11112

http://bugs.squeak.org/view.php?id=6456

A very simple example to illustrate the bug:

| x |
x := (1.0 timesTwoPower: 53).
(x to: x + 2) size.
x to: x+2 do: [:i | Transcript cr; show: i printString]

Thanks to Nicolas (aka nice)

For IntervalTest:
Before loading the slice:
233 run, 233 passes, 0 expected failures, 0 failures, 0 errors, 0  
unexpected passes

After loading the slice:
234 run, 234 passes, 0 expected failures, 0 failures, 0 errors, 0  
unexpected passes

Thanks Nicolas for the fix,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.







--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: More from TheTrunk

Stéphane Ducasse
I tried to understand
>
>
>
> A very simple example to illustrate the bug:
>
> | x |
> x := (1.0 timesTwoPower: 53).
> (x to: x + 2) size.
> x to: x+2 do: [:i | Transcript cr; show: i printString]

it is normal that it still loops forever after loading the slice?

Stef

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: More from TheTrunk

Alexandre Bergel
Yes, that's the bug, identified by Nicolas

Alexandre


On 25 Dec 2009, at 10:49, Stéphane Ducasse wrote:

> I tried to understand
>>
>>
>>
>> A very simple example to illustrate the bug:
>>
>> | x |
>> x := (1.0 timesTwoPower: 53).
>> (x to: x + 2) size.
>> x to: x+2 do: [:i | Transcript cr; show: i printString]
>
> it is normal that it still loops forever after loading the slice?
>
> Stef
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: More from TheTrunk

Stéphane Ducasse
Yes but when I load the fix
the bug is still there.
Did you slice changes this behavior?
or the slice is just about adding a test that fails?



> Yes, that's the bug, identified by Nicolas
>
> Alexandre
>
>
> On 25 Dec 2009, at 10:49, Stéphane Ducasse wrote:
>
>> I tried to understand
>>>
>>>
>>>
>>> A very simple example to illustrate the bug:
>>>
>>> | x |
>>> x := (1.0 timesTwoPower: 53).
>>> (x to: x + 2) size.
>>> x to: x+2 do: [:i | Transcript cr; show: i printString]
>>
>> it is normal that it still loops forever after loading the slice?




>>
>> Stef
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: More from TheTrunk

Nicolas Cellier
2009/12/25 Stéphane Ducasse <[hidden email]>:

> Yes but when I load the fix
> the bug is still there.
> Did you slice changes this behavior?
> or the slice is just about adding a test that fails?
>
>
>
>> Yes, that's the bug, identified by Nicolas
>>
>> Alexandre
>>
>>
>> On 25 Dec 2009, at 10:49, Stéphane Ducasse wrote:
>>
>>> I tried to understand
>>>>
>>>>
>>>>
>>>> A very simple example to illustrate the bug:
>>>>
>>>> | x |
>>>> x := (1.0 timesTwoPower: 53).
>>>> (x to: x + 2) size.
>>>> x to: x+2 do: [:i | Transcript cr; show: i printString]
>>>
>>> it is normal that it still loops forever after loading the slice?
>

I thought it was already in Pharo, wasn't it ?
The fix only apply to this one (Interval>>do:):

(x to: x+2) do: [:i | self doSomethingWith: i]

not to this one (Number:>#to:do:):

x to: x+2 do: [:i | self doSomethingWith: i]

The second one is inlined by compiler as something like
i := x.
end := x+2.
[i <= end] whileTrue: [
   self doSomethingWith: i.
   i := i+1]

Converting to a (step*index+start) pattern would cost consumption of
additional temporary variable slots and complexified code for every
inlined #to:do: loop.
I did not find any satisfying solution yet, just to make silly loop on
Float work, so by now this remains a known limitation.
General rule: avoid using interval of Float. Don't use to:by:do: with
a Float receiver nor a Float step.

Nicolas

>
>
>
>>>
>>> Stef
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: More from TheTrunk

Alexandre Bergel
> I thought it was already in Pharo, wasn't it ?
> The fix only apply to this one (Interval>>do:):

Ok, but part of your fix was not in Pharo.
With SLICE-IntervalFix-FromTrunk-Alexandre_Bergel.1 , it is now in.

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project