[squeak-dev] Float parsed as a Fraction bug
leves at elte.hu
Thu Aug 7 21:02:05 UTC 2014
On Thu, 7 Aug 2014, J. Vuletich (mail lists) wrote:
> Quoting Eliot Miranda <eliot.miranda at gmail.com>:
>> On Thu, Aug 7, 2014 at 12:03 PM, J. Vuletich (mail lists) <
>> juanlists at jvuletich.org> wrote:
>>> The attach shows that in ST-80 a CompiledMethod can contain a Fraction
>>> literal. Source code form for that is '1e-3'. Debugger works as in Squeak
>>> or Cuis.
>> then if you feel strongly change it back, but you need to fix this:
>> (1/2) isLiteral false
>> when you do so.
> Well, I don't feel strongly about this, and I don't see what needs to be
> changed back in Squeak or Cuis.
> What I say is that the behavior we have in ST-80 / Squeak / Cuis seems right
> to me, I don't see any problem at all.
> So, please elaborate: What should be changed back in Squeak (or Cuis)? Why
> does (1/2) isLiteral = false needs fixing? I mean, where is the bug? (I mean
> in ST-80, Squeak and Cuis. Not Pharo, where there is a bug while debugging
> this stuff.)
Try debugging the following snippet:
| x |
x := 5e-1.
x := x + 1
You'll find that in Cuis it'll be decomipled as:
| x |
x _ (1/2).
^ x _ x + 1.
And the debugger will get confused (in Squeak and Pharo too), because
there's (1/2) instead of 5e-1, which is not a literal.
Also if you press Over, then Proceed in the debugger, then the image will
become unresponsive in Cuis (Cuis4.2-1766).
> Juan Vuletich
More information about the Squeak-dev