[Pharo-project] More from TheTrunk
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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/12/25 Stéphane Ducasse <stephane.ducasse@inria.fr>:
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel  http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ 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
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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (3)
-
Alexandre Bergel -
Nicolas Cellier -
Stéphane Ducasse