[squeak-dev] [Masters of Squeak] Have fun figuring this out

Igor Stasenko siguctua at gmail.com
Thu Jun 25 15:28:12 UTC 2009


I prefer a more shorter way to get puzzled:

type:
0

and then use 'debug it' from menu

:)


2009/6/25 Bert Freudenberg <bert at freudenbergs.de>

> If you evaluate the following two statements together
>
>
>  10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39.
>        [:a :b :c | self halt] value: 0 value: 0 value: 0.
>
> you are dropped into an emergency evaluator (in a non-closure image
> anyway). Evaluating each statement individually is no problem.
>
> If you have fun figuring out puzzling behavior or want to prove your Squeak
> Skillz you might try to investigate it. If you need hints, scroll down to
> (*).
>
> For the rest, a fix and explanation is on Mantis:
>
> http://bugs.squeak.org/view.php?id=7355
>
> - Bert -
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> (*) These lines
>
>
>  10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39+40.
>        [:a :b :c | ] decompile
>
> let you debug the issue. Full explanation below (**)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> (**) The decompiler fails because the #blockCopy: argument is the 33rd
> literal and hence uses an extended byte code to push. This is not
> anticipated by the decompiler which assumes a single-byte instruction is
> used to push the argument. And if this explanation does not make sense to
> you ... you've got a lot to learn about the inner workings of Squeak ;)
>
>
>


-- 
Best regards,
Igor Stasenko AKA sig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090625/ddada8a2/attachment.htm


More information about the Squeak-dev mailing list