{"id":364,"date":"2017-02-07T17:36:34","date_gmt":"2017-02-08T01:36:34","guid":{"rendered":"http:\/\/www.mirandabanda.org\/cogblog\/?p=364"},"modified":"2017-02-08T11:08:43","modified_gmt":"2017-02-08T19:08:43","slug":"smalltalk-scanning-and-shcontrol-structures","status":"publish","type":"post","link":"http:\/\/www.mirandabanda.org\/cogblog\/2017\/02\/07\/smalltalk-scanning-and-shcontrol-structures\/","title":{"rendered":"Smalltalk, Scanning and S^HControl Structures"},"content":{"rendered":"<p>Here&#8217;s what I hope you&#8217;ll agree is a nice example of bytecode analysis and of creating custom control structures in Smalltalk. One might think that a dynamically-typed language like Smalltalk is difficult to analyze. But in fact there are many ways of analyzing it, and this post concerns analyzing bytecode. Further, languages that support closures (Smalltalk calls them blocks, and you might know them as anonymous functions) allow one easily to construct custom control structures, and this post works up to a nice example.<\/p>\n<p>First some context, which is code within the Just-in-Time compiler for Cog, the Smalltalk virtual machine for Squeak, Scratch et al that this blog discusses. In the bowels of Cog&#8217;s Just-in-Time compiler is code that merges control flow when a jump bytecode jumps to another bytecode. The execution state for the control flow falling though to the target bytecode must be merged with the execution state of the bytecode jumping to that bytecode (or vice verse). Also, a jump instruction generated as part of a jump from some previous bytecode to some target bytecode must be &quot;fixed up&quot; to jump to the first instruction generated for the target bytecode when the JIT gets around to generating the instructions for the target bytecode. That&#8217;s not the topic of this post ;-). What is the topic is simplifying the code that does this, because when I wrote it in the first place I made a mistake, writing the code in an ugly manner. Now I want to write the code in a cleaner manner and I want to check that the clean up is always appropriate.<\/p>\n<p>The two methods that are at the heart of the &quot;merge&quot; and the &quot;jump to&quot; operations are ensureFixupAt: and ensureNonMergeFixUpAt:. Typical usage looks like this:<\/p>\n<pre><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">nextPC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">notAFixup<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F7F\">&quot;The next instruction is dead.  we can skip it.&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\">deadCode<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">true<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">targetBytecodePC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">postBranchPC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">deny:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">deadCode<\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\"> <\/font><font color=\"#007F7F\">&quot;push dummy value below&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">assert:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">(<\/font><font color=\"#6B6B6B\">unforwardArg<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">or:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">[<\/font><font color=\"#6B6B6B\">unforwardRcvr<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">orNot<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">branchDescriptor<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">isBranchTrue<\/font><font color=\"#000000\"> <\/font><font color=\"#007F7F\">&quot;orNot is true for ~~&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F7F\">&quot;branchDescriptor is branchFalse&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">postBranchPC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">asUnsignedInteger<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">JumpZero:<\/font><font color=\"#000000\">  <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">targetBytecodePC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">asUnsignedInteger<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">targetBytecodePC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">asUnsignedInteger<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">JumpZero:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">postBranchPC<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">initialPC<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">asUnsignedInteger<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><\/pre>\n<p>\nThe bug you can see is that all calls to the routines first subtract initialPC from the bytecode PC to get to the index of the fixup for that pc. That&#8217;s ugly. I&#8217;d like to move the &quot;- initialPC&quot; sends into ensureFixupAt: and ensureNonMergeFixupAt:. But I&#8217;d like to know if <i>all<\/i> calls on the two methods involve &quot;- initialPC&quot; before I make this change. One simple way to do this is to scan the bytecode of the relevant methods.  For this I can use Smalltalk&#8217;s InstructionStream, which is used for all sorts of things including the debugger.  [<i>An aside to non-Smalltalkers; one of the powerful things about Smalltalk is that the system is not merely a compiler for Smalltalk source; it&#8217;s a live object space, and the code exists as CompiledMethod objects in the system that one can look at directly<\/i>].<\/p>\n<p>What I want to do is look for all sends of either ensureFixupAt: or ensureNonMergeFixupAt: and verify that they&#8217;re always preceded by a bytecode that pushes the initialPC instance variable of the Just-in-Time compiler and a send of #-. InstructionStream provides a custom control structure &quot;scanFor:&quot; that takes a one-argument block and evaluates it with the numeric value of each bytecode in a method until the block answers true. scanFor: answers false if the block never evaluates to true. The bytecodes look like this:<\/p>\n<pre>&nbsp;&nbsp;&nbsp;&nbsp;279 &lt;70&gt; self\r\n&nbsp;&nbsp;&nbsp;&nbsp;280 &lt;8C 03 05&gt; pushTemp: 3 inVectorAt: 5\r\n&nbsp;&nbsp;&nbsp;&nbsp;283 &lt;80 1C&gt; pushRcvr: 28\r\n&nbsp;&nbsp;&nbsp;&nbsp;285 &lt;B1&gt; send: -\r\n&nbsp;&nbsp;&nbsp;&nbsp;286 &lt;EE&gt; send: ensureFixupAt:\r\n&nbsp;&nbsp;&nbsp;&nbsp;287 &lt;87&gt; pop\r\n&nbsp;&nbsp;&nbsp;&nbsp;288 &lt;70&gt; self\r\n&nbsp;&nbsp;&nbsp;&nbsp;289 &lt;8C 05 05&gt; pushTemp: 5 inVectorAt: 5\r\n&nbsp;&nbsp;&nbsp;&nbsp;292 &lt;80 1C&gt; pushRcvr: 28\r\n&nbsp;&nbsp;&nbsp;&nbsp;294 &lt;B1&gt; send: -\r\n&nbsp;&nbsp;&nbsp;&nbsp;295 &lt;EE&gt; send: ensureFixupAt:\r\n&nbsp;&nbsp;&nbsp;&nbsp;296 &lt;94&gt; jumpTo: 302\r\n&nbsp;&nbsp;&nbsp;&nbsp;297 &lt;70&gt; self\r\n&nbsp;&nbsp;&nbsp;&nbsp;298 &lt;84 40 B7&gt; pushRcvr: 183\r\n&nbsp;&nbsp;&nbsp;&nbsp;301 &lt;EC&gt; send: deny:\r\n&nbsp;&nbsp;&nbsp;&nbsp;302 &lt;87&gt; pop\r\n&nbsp;&nbsp;&nbsp;&nbsp;303 &lt;70&gt; self\r\n&nbsp;&nbsp;&nbsp;&nbsp;304 &lt;12&gt; pushTemp: 2\r\n&nbsp;&nbsp;&nbsp;&nbsp;305 &lt;99&gt; jumpFalse: 308\r\n&nbsp;&nbsp;&nbsp;&nbsp;306 &lt;71&gt; pushConstant: true\r\n&nbsp;&nbsp;&nbsp;&nbsp;307 &lt;90&gt; jumpTo: 309\r\n&nbsp;&nbsp;&nbsp;&nbsp;308 &lt;11&gt; pushTemp: 1\r\n&nbsp;&nbsp;&nbsp;&nbsp;309 &lt;83 31&gt; send: assert:\r\n&nbsp;&nbsp;&nbsp;&nbsp;311 &lt;87&gt; pop\r\n&nbsp;&nbsp;&nbsp;&nbsp;312 &lt;10&gt; pushTemp: 0\r\n&nbsp;&nbsp;&nbsp;&nbsp;313 &lt;8C 01 05&gt; pushTemp: 1 inVectorAt: 5\r\n&nbsp;&nbsp;&nbsp;&nbsp;316 &lt;D8&gt; send: isBranchTrue\r\n&nbsp;&nbsp;&nbsp;&nbsp;317 &lt;C6&gt; send: ==\r\n&nbsp;&nbsp;&nbsp;&nbsp;318 &lt;AC 1C&gt; jumpFalse: 348\r\n&nbsp;&nbsp;&nbsp;&nbsp;320 &lt;70&gt; self\r\n&nbsp;&nbsp;&nbsp;&nbsp;321 &lt;8C 03 05&gt; pushTemp: 3 inVectorAt: 5\r\n&nbsp;&nbsp;&nbsp;&nbsp;324 &lt;80 1C&gt; pushRcvr: 28\r\n&nbsp;&nbsp;&nbsp;&nbsp;326 &lt;B1&gt; send: -\r\n&nbsp;&nbsp;&nbsp;&nbsp;327 &lt;83 33&gt; send: ensureNonMergeFixupAt:\r\n<\/pre>\n<p>\nNow this is more than a little inconvenient to parse.  In particular, the details of the bytecode for each send vary.  Smalltalk has compact bytecodes for common selectors such as #-, so there&#8217;s a special bytecode for it (16rB1 at 294) and for #== (16rC6 at 317).  Some times the literal offset for the ensureFixupAt: selector will mean a one byte send bytecode can be used (such as 16rEE at 286) and sometimes it&#8217;ll have to be a two byte bytecode (such as 16r83 16r33 at 327).  Any attempt to look at the code at this level will cause confusion and delay.  Luckily InstructionStream has facilities to extract the bytecode semantics, lifting the level of abstraction well above the numeric values.  peekInstruction answers a Message instance that is the message that InstructionStream would send to a client when decoding a bytecode.  So in the above at 280 peekInstruction will return a Message selector: #pushTemp:inVectorAt: arguments: #(3 5).  selectorToSendOrSelf answers either the selector of a message send bytecode or the InstructionScanner itself, so at 286 selectorToSendOrSelf will answer #ensureFixupAt:, but at 287 it will answer the InstructionStream.  With these facilities we can write something almost comprehensible:<\/p>\n<p><font color=\"#00007F\"><br \/>\n<\/font><\/p>\n<pre><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">systemNavigation\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">browseAllSelect:\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">m<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#000000\">InstructionStream<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">on:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">m<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">peekInstruction<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">scanFor:\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">b<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">ok<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ok<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#00007F\">#<\/font><font color=\"#000000\">(<\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">includes:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selectorToSendOrSelf<\/font><font color=\"#7F007F\">)<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#pushReceiverVariable:\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">[<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">28<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#00EA00\">[<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA8C00\">[<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#-<\/font><font color=\"#EA8C00\">]<\/font><font color=\"#00EA00\">]<\/font><font color=\"#7F0000\">]<\/font><font color=\"#7F007F\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">peekInstruction<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ok<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">]<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">localTo:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">Cogit<\/font>\r\n<\/pre>\n<p>\nThe heart of this is<\/p>\n<pre><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ok<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#00007F\">#<\/font><font color=\"#000000\">(<\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">includes:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selectorToSendOrSelf<\/font><font color=\"#7F007F\">)<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#pushReceiverVariable:\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">[<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">28<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#00EA00\">[<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA8C00\">[<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#-<\/font><font color=\"#EA8C00\">]<\/font><font color=\"#00EA00\">]<\/font><font color=\"#7F0000\">]<\/font><font color=\"#7F007F\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><\/pre>\n<p>\nwhich sets ok to true if the current instruction is a send of ensureFixupAt: or ensureNonMergeFixupAt: and the previous previous instruction (ppi) is a push of initialPC, and if the previous instruction (pi) is a send of #-.  So the block must manage updating ppi and pi.  Hence haivng to save the value of the test in the variable &quot;ok&quot;, and the statements<br \/>\n<font color=\"#00007F\"><br \/>\n<\/font><\/p>\n<pre><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">ppi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\">.<\/font><font color=\"#00007F\">\r\n<\/font><font color=\"#00007F\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">pi<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">is<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">peekInstruction<\/font><font color=\"#000000\">.\r\n<\/font><\/pre>\n<p>\nto update them before answering &quot;ok&quot; as the value of the block, and the statement to initialize them to message objects before scanFor: is invoked.<\/p>\n<p>Wouldn&#8217;t it be nice if we could add a method that abstracted away from the need to wrangle these variables?  Indeed, and it&#8217;s quite easy.  Let&#8217;s add a method <font color=\"#00007F\">scanForInstructionSequence:<\/font> to InstructionStream to do precisely this:<\/p>\n<pre>&nbsp;&nbsp;&nbsp;&nbsp;<i>InstructionStream methods for scanning<\/i>\r\n<font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><b>scanForInstructionSequence:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;naryBlock is a block taking one or more arguments.\r\n<\/font><font color=\"#007F7F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Evaluate it for each sequence of instructions of length\r\n<\/font><font color=\"#007F7F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n in the receiver until naryBlock evaluates to true.\r\n<\/font><font color=\"#007F7F\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Answer if naryBlock evaluated to true.&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">instructions<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#6B6B6B\">instructions<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#000000\">OrderedCollection<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withAll:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">(<\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">collect:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">ign<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">atEnd<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#7F0000\">^<\/font><font color=\"#7F0000\">false<\/font><font color=\"#7F007F\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">nextInstruction<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#007F00\">(<\/font><font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">valueWithArguments:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">instructions<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">asArray<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#7F0000\">^<\/font><font color=\"#7F0000\">true<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">atEnd<\/font><font color=\"#000000\">]<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">whileFalse:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#6B6B6B\">instructions<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">removeFirst<\/font><font color=\"#000000\">;<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">addLast:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">nextInstruction<\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#7F0000\">false\r\n<\/font><\/pre>\n<p>\nLet&#8217;s break this down.  <font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font> answers the number of arguments the block takes.  This way we don&#8217;t need a method for one-instruction sequences, another for two-instruction sequences, etc; we&#8217;ll just have one method for any length of sequence (up to the maximum argument count for a block, which in Squeak and Pharo is currently 15).  <font color=\"#007F00\">(<\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#007F00\">)<\/font> constructs an Interval from 1 to that value, and <font color=\"#00007F\">collect:<\/font> applies its argument to each element of the Interval (collect: is Smalltalk&#8217;s map).  <font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">atEnd<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#7F0000\">^<\/font><font color=\"#7F0000\">false<\/font><font color=\"#7F007F\">]<\/font><font color=\"#000000\">.  <\/font>checks that there is an instruction avalable to parse, and aborts if not, so if a method doesn&#8217;t have enough bytecodes to supply naryBlock, <font color=\"#00007F\">scanForInstructionSequence:<\/font> answers false instead of raising an error as it tries to access bytecodes that don&#8217;t exist.  OrderedCollection is Smalltalk&#8217;s double-ended queue, so we can maintain the sequence of instuctions by adding a new one to the end and removing an old one from the front.  <font color=\"#00007F\">nextInstruction<\/font> is the method that collects the message for a given bytecode and advances the InstructionStream&#8217;s pc to the next bytecode.  So the first statement collects the first <font color=\"#00007F\">naryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font> bytecode messages, answering false if there aren&#8217;t enough.<\/p>\n<p>The next statement is a while loop that supplies the bytecode messages to naryBlock, testing the result and answering true if naryBlock answers true.  <font color=\"#00007F\">valueWithArguments:<\/font> is the block evaluation method that evaluates a block with a collection iof arguments, as opposed to value, value:, value:value: et al that take individual arguments.  But <font color=\"#00007F\">valueWithArguments:<\/font> takes an Array, not an OrderedCollection, so the OrderedCollection is copied to an Array before sending <font color=\"#00007F\">valueWithArguments:<\/font>.  As long as there are still isntructions to be processed (<font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">atEnd<\/font> is false), the body of the while loop removes the first bytecode message before adding a new one at the end.  Finaly, if naryBlock never evaluates to true, <font color=\"#00007F\">scanForInstructionSequence:<\/font> answers false.<\/p>\n<p>So we&#8217;ve abstracted away from wrangling those instructions and created a custom control structure that evaluates a block with any length of instruction sequence from 1 to 15, answering whether that block evaluated to true.  Neat.<\/p>\n<p>So let&#8217;s apply this new method to our previous example.  And let&#8217;s add another search that answers the converse, finding all sends of ensureFixupAt: or ensureNonMergeFixupAt: that are <i>not<\/i> preceded by a push of initalPC followed by a send of #-.<\/p>\n<pre><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">systemNavigation<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">browseAllSelect:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">m<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">(<\/font><font color=\"#000000\">InstructionStream<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">on:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">m<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">scanForInstructionSequence:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">c<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#pushReceiverVariable:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">28<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">[<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#00EA00\">[<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#-<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA8C00\">[<\/font><font color=\"#00007F\">c<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA00EA\">[<\/font><font color=\"#00007F\">#<\/font><font color=\"#000000\">(<\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">includes:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">c<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#EA00EA\">]<\/font><font color=\"#EA8C00\">]<\/font><font color=\"#00EA00\">]<\/font><font color=\"#7F0000\">]<\/font><font color=\"#7F007F\">]<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">]\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">localTo:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">Cogit<\/font><font color=\"#000000\">;\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">browseAllSelect:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">m<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">(<\/font><font color=\"#000000\">InstructionStream<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">on:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">m<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">scanForInstructionSequence:<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">c<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">c<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">[<\/font><font color=\"#7F0000\">(<\/font><font color=\"#00007F\">#<\/font><font color=\"#000000\">(<\/font><font color=\"#00007F\">ensureFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">includes:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">c<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#7F0000\">)<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">[<\/font><font color=\"#00EA00\">(<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#pushReceiverVariable:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA8C00\">[<\/font><font color=\"#00007F\">a<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">28<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#EA00EA\">[<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#send:super:numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#0000FF\">[<\/font><font color=\"#00007F\">b<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argument<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#-<\/font><font color=\"#0000FF\">]<\/font><font color=\"#EA00EA\">]<\/font><font color=\"#EA8C00\">]<\/font><font color=\"#00EA00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">not<\/font><font color=\"#7F0000\">]<\/font><font color=\"#7F007F\">]<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">]\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">localTo:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">Cogit<\/font>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n<\/pre>\n<p>Nice.  And using this I find that the only such sends in the Just-in-Time compiler that don&#8217;t involve a &quot;- initalPC&quot; are overrides of ensureFixupAt: or ensureNonMergeFixupAt: in subclasses:<\/p>\n<pre><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\"><i>RegisterAllocatingCogit methods for compile abstract instructions<\/i><\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><b>ensureNonMergeFixupAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">targetIndex<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Make sure there's a flagged fixup at the targetIndex (pc relative to first pc) in fixups.<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&nbsp;&nbsp;&nbsp;&nbsp; Initially a fixup's target is just a flag.  Later on it is replaced with a proper instruction.&quot;<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\">\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">super<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ensureNonMergeFixupAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">targetIndex<\/font><font color=\"#000000\">.\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">mergeSimStack<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifNil:<\/font><font color=\"#000000\"> <\/font><font color=\"#000000\">[<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">setMergeSimStackOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#6B6B6B\">fixup<\/font><font color=\"#000000\">]<\/font><font color=\"#000000\">.\r\n<\/font><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#6B6B6B\">fixup<\/font>\r\n<\/pre>\n<p>\nSo indeed, it is safe to make the change.<\/p>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKbDS1y8vL9fLzSxKzEtJTAIRevlF6frJ+elJOfnpAA==\" \/><input type=\"hidden\" name=\"blogName\" value=\"c85PV3DKyU8HAA==\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzYzAQA=\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"C85NzMkpSczJ1lEITk7My8vMS1dIzEtRCI7zcM7PKynKz1EILikqTS4pLUotBgA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"FcoxDoAgDADAF0HRxcTfFDRILK1pS\/i+utx0l\/uzA8w5Y2+KfGD+iaIVitRMUmFNywZphbSBdSRypDtYQebGNXw92FWEXYWCuY7iQ0+DFw==\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"S0zJzcwDAA==\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwNNc1MNI1MFcwNLcyMLIyNgEA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7T1pbyO5sd8X2P9A7ADzbMD2SNbM+BiPHzzOGHGQmQ1iJwu8hR9AdVMS193NXrJbsoIgvz1VRfahqy2pJVv2Kot4124edbPIKhbP4vM\/Cy3evjk+bB59Mm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8VvWLVqb4rVr2eblVnETqj8jxG5+2t\/SWTSNdlcjK23W3YfcO5qoQ85SZ\/xbU+ZmRWbI8ttscW22OL7bHF9tjiRfmmW\/dx3ZVx5nEQt87lhjmXGdt2t+c10\/zmne1R6LMWitkehT7XRSTGnvEMYntMWv+YtNG4uvpjHpNeXc0+LKl\/lFLHFaCcj+1BzMJFV1dl1crlW79LL0sHSo1NjpKGXVOGT55\/zFQUDO1zpDbbx6XJTn\/1fSJPF6vSBJiW5Yri7Od5PVlxHA1TwAKs6SH4RVKJABCTtr0AXxcu13ZZUe1c7HQmz\/8uutIkQl8EyFNM7STGjBSFcejnuWds9K6TPF\/H+lfUd5jlzS9XSCYBsyYSLOXzsGGlZL5hbqmxuXhCi\/\/BJLxOwLtd4YPMAtZZVmIJBbYTe0yLADhn35O1eY6xt4vyQ73MwTrZs1DhFnZtSz8FmOlGwAGSFhtM6aRLPRZnrKTEE7yEFGHmPHzUIg64B6Rwib2xVjHWeilE8TUVdiHivIqKLgtgsmyhasprRHfsaY8MVmNnDjaUGdNPlpE4NzK8SXitGw+y813WKpXz61qTXEXyrYzoz53Ttary3fMLSPUtsGmojBTKp7eybXE8a60N79ByFOKaRgnWPR51XVb7fwE=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"http:\/\/www.mirandabanda.org\/cogblog\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s what I hope you&#8217;ll agree is a nice example of bytecode analysis and of creating custom control structures in Smalltalk. One might think that a dynamically-typed language like Smalltalk is difficult to analyze. But in fact there are many ways of analyzing it, and this post concerns analyzing bytecode. Further, languages that support closures [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/364"}],"collection":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/comments?post=364"}],"version-history":[{"count":9,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/364\/revisions"}],"predecessor-version":[{"id":373,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/364\/revisions\/373"}],"wp:attachment":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/media?parent=364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/categories?post=364"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/tags?post=364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}