[Pharo-project] a useful check
eliot.miranda at gmail.com
Fri Oct 22 13:33:34 EDT 2010
I just stumbled across a bug of mine which is a rare but easy-to-make
slip, that of an unused block, e.g. expr ifTrue: [[something that doesn't
get done]]. Here's a check for it (I'll check it in as a SysdtemNavigation
method and perhaps the RB includes it in its lint tests). There's one
method in Squeak trunk that falls foul of this.
"Scan for the byte following each block creation being the pop bytecode."
SystemNavigation new browseAllSelect:
[:m| | is |
is := InstructionStream on: m.
is scanFor: [:b| b = 143 and: [(m at: is thirdByte * 256 + is fourthByte +
is pc + 4) = 135]]]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev