[squeak-dev] a useful check

Eliot Miranda eliot.miranda at gmail.com
Fri Oct 22 17:33:34 UTC 2010


Hi All,

    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...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20101022/cdfff6ec/attachment.htm


More information about the Squeak-dev mailing list