[squeak-dev] [Masters of Squeak] Have fun figuring this out
Bert Freudenberg
bert at freudenbergs.de
Thu Jun 25 15:18:30 UTC 2009
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 ;)
More information about the Squeak-dev
mailing list
|