{"id":11,"date":"2008-07-22T18:01:41","date_gmt":"2008-07-23T01:01:41","guid":{"rendered":"http:\/\/www.mirandabanda.org\/cogblog\/?p=11"},"modified":"2009-08-02T11:35:27","modified_gmt":"2009-08-02T19:35:27","slug":"closures-part-ii-the-bytecodes","status":"publish","type":"post","link":"http:\/\/www.mirandabanda.org\/cogblog\/2008\/07\/22\/closures-part-ii-the-bytecodes\/","title":{"rendered":"Closures Part II &#8211; the Bytecodes"},"content":{"rendered":"<p><html><head><\/head><body>Its been a while since the last post.  I&#8217;ve been working on the stack VM and the closure bootstrap.  But its high time I posted more of the closure implementation.  Apologies for the delay.<\/p>\n<p>In the post before last we saw the closure design in Cog and its prototype implementation above an unmodified VM.  This post looks at the opcodes used to implement Closures in the image.  The image level implementation is in InsructionStream, ContextPart and MethodContext is used by the debugger and some of the image-level browsing facilities.  The next post will probably present the VM implementation.  <\/p>\n<p>Before we dive in, let&#8217;s recap.  The closure implementation has one key aim for performance.  The activation of a closure should be independent of its enclosing activation.  This simplifies stack management meaning that while the closure is running it doesn&#8217;t need to access its lexically enclosing activation to run.  This is achieved by a simple transformation in two parts.  Any closed-over variable that does not change after being closed-over is copied into the closure which accesses the copy.  Any closed-over variable which does change after being closed over is put in a heap-allocated &quot;indirection vector&quot; (a simple array, one element per closed-over variable) and the indirection vector is copied into the closure.  All accesses to the variable are made through the indirection vector.  Here&#8217;s the transformation applied at the source level to inject:into:<\/p>\n<p><i>Collection methods for enumerating<\/i><br \/>\ni<b>nject:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">thisValue<\/font><font color=\"#000000\"> <\/font><b>into:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">binaryBlock<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">nextValue<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">nextValue<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">thisValue<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"> [:<\/font><font color=\"#00007F\">each<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">nextValue<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">binaryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">value:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">nextValue<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">value:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">each<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#3F3F3F\">nextValue<br \/>\n<\/font><br \/>\n<i>transforms to<\/i><br \/>\ni<b>nject:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">thisValue<\/font><font color=\"#000000\"> <\/font><b>into:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">binaryBlock<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">thisValue<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"> [:<\/font><font color=\"#00007F\">each<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#00007F\">binaryBlock<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">value:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#7F007F\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">value:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">each<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#000000\">(<\/font><font color=\"#3F3F3F\">indirectTemps<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">)<\/font><\/p>\n<p>So let&#8217;s implement this with bytecodes, so that we can bootstrap closures in something close to the current VM, something that will run both the existing system and a system recompiled to use closures.  Before we do so we need to digress a bit on bytecode set design.<\/p>\n<p>Eventually we&#8217;ll design a new bytecode set which will be chosen to encode the opcodes we find in the current system as efficiently as we can.  That means<br \/>\n&#8211; making sure that opcodes with high dynamic frequency have short bytecodes that are quick to interpret<br \/>\n&#8211; that opcodes with high static frequency have short bytecodes that represent them compactly<br \/>\n&#8211; and that bytecodes exist to ensure all opcodes have large enough ranges to implement the system without restriction.<\/p>\n<p>What do I mean?  Well, look at the Push Receiver Variable opcode which has several bytecodes in the current Squeak VM:<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0-15 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0000iiii \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Receiver Variable #iiii<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;128 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10000000 jjkkkkkk \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push (Receiver Variable, Temporary Location, Literal Constant, Literal Variable) [jj] #kkkkkk<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;132 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10000100 iiijjjjj kkkkkkkk \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Send, Send Super, Push Receiver Variable,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Push Literal Constant,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Push Literal Variable, Store Receiver Variable,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store-Pop Receiver Variable, Store Literal Variable)[iii] #kkkkkkkk jjjjj<\/p>\n<p>Push Receiver Variable has both high dynamic frequency (how often an opcode is evaluated) and static frequency (how often an operation occurs in methods).  Most objects have few instance variables.  In my Croquet image only 20% of classes (ignoring metaclasses) have more than 15 instance variables.  So there is both a high static and high dynamic frequency of pushing instance variables with a small offset.  Hence the design above where there are 16 one-byte bytecodes to access the instance variables with offsets 0 through 15, a two byte bytecode that can access instance variables with offsets 0 through 63 and a three byte bytecode that can access instance variables with offsets 0 through 255, the maximum imposed by a class&#8217;s instance format word (the largest class in my image has 139 instance variables).<\/p>\n<p>Interpreting the short forms 0-15 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0000iiii Push Receiver Variable #iiii is a lot quicker than interpreting the longer forms.  One piece of code I ran to measure the sizes of bytecoded methods in two images, one which used only the long-forms and one which used the shortest forms available, ran 40% slower in the image which used only the long forms.  So the game in designing a bytecode set is to divide up the available bytecode space amongst the opcodes to achieve a compromise between dynamic and static frequency.  In practice optimizing on the basis of static frequency is a good heuristic since static frequency is a fair predictor of dynamic frequency.<\/p>\n<p>But the design of a bytecode set for the closure system is something that can wait until we&#8217;ve bootstraped the closure system and can start to perform some measurements.  The first order of business is to bootstrap closures in the existing Squeak VM.  To do that we need to find room.  Only if we can&#8217;t find room do we need to make room. Luckily, the existing Squeak VM has 8 unused bytecodes, and that&#8217;s more than enough.<\/p>\n<p>Here are the unused entries in the method that defines the VM&#8217;s bytecodes, Interpreter class&gt;&gt;initializeBytecodeTable:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(126 127 unknownBytecode)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(138 143 experimentalBytecode)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>We&#8217;ll use 5 of the 6 experimental bytecodes.  These aren&#8217;t generated by the compiler (and implement an optimization we hope to outdo).  We don&#8217;t have many to play with so we can&#8217;t do much space optimization.  Because we only have 6 and each opcode needs at least one index we&#8217;ll have to use multi-byte encodings and include the indices in trailing bytes.<\/p>\n<p><H2>New Closure Bytecodes<\/H2><\/p>\n<p>Here are all 5 bytecodes.  We&#8217;ll go through each separately three times.  First we&#8217;ll define the bytecodes.  Then we&#8217;ll implement them in the image&#8217;s execution simulation machinery, which we can use to test the bytecode before we generate a VM, and which is used by the debugger and also by the printing machinery that disassembles methods.  lastly we&#8217;ll go through the VM code.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;138 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001010 jkkkkkkk \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push (Array new: kkkkkkk)\/Pop kkkkkkk into: (Array new: kkkkkkk)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;140 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001100 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;141 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001101 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;142 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001110 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pop and Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;143 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001111 llllkkkk jjjjjjjj iiiiiiii\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Closure Num Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii<\/p>\n<p>The first opcode can be used to create indirect temp vectors.  Because Squeak stack frames are limited in size (50-ish slots) we don&#8217;t need to be able to create an Array with 265 elements.   We can make our bytecode more useful if it can either create a new Array initialized with nils or initialize a new Array with elements popped off the stack.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;138 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001010 jkkkkkkk    Push (Array new: kkkkkkk)\/Pop kkkkkkk into: (Array new: kkkkkkk)<\/p>\n<p>So we can use it to compile brace expressions.  In Squeak<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ expr1. expr2. expr3. }<br \/>\nis convenient short-hand for<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array with: expr1 with: expr2 with: expr3<br \/>\nand more flexible because brace expressions can have any number of elements.  The existing Squeak compiler compiles brace expressions with up to 4 elements as sends of braceWith:[with:[with:[with:]]].  e.g.<\/p>\n<p><i>Bezier3Segment methods for vector functions<br \/>\n<\/i><b>controlPoints<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#000000\">{start. via1. via2. end}<\/font><\/p>\n<p>is compiled to<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21 &lt;41&gt; pushLit: Array<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22 &lt;00&gt; pushRcvr: 0<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23 &lt;02&gt; pushRcvr: 2<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24 &lt;03&gt; pushRcvr: 3<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25 &lt;01&gt; pushRcvr: 1<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;26 &lt;83 80&gt; send: braceWith:with:with:with:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;28 &lt;7C&gt; returnTop<\/p>\n<p><i>Question, why does the compiler limit itself to only 4 elements max?<\/i><\/p>\n<p>With the new bytecode this compiles to<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13 &lt;00&gt; pushRcvr: 0<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;14 &lt;02&gt; pushRcvr: 2<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15 &lt;03&gt; pushRcvr: 3<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;16 &lt;01&gt; pushRcvr: 1<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17 &lt;8A 84&gt; pop 4 into (Array new: 4)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19 &lt;7C&gt; returnTop<br \/>\nThe top bit of the following byte (bit j in the specification) is set and indicates popping 4 elements off the stack into the new array.  The VM already knows the class Array because it is used e.g. in doesNotUnderstand: processing.  We save 8 bytes by not having to have the literals for the class Array and the message selector #braceWith:with:with:with: in the compiled method.  We save a further byte avoiding the pushLit: instruction.  And of course the bytecode is much quicker to interpret than the old code.  We&#8217;re saving time and space.  Way to go.<\/p>\n<p>So in compiling inject:into: the first two bytecodes look like<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17 &lt;8A 01&gt; push: (Array new: 1)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19 &lt;6A&gt; popIntoTemp: 2<\/p>\n<p>We could have designed the bytecode to include the offset of the local into which we want to store the new array since in our compiler Push (Array new: kkkkkkk) is always followed by a popIntoTemp: n.  But since there can currently be up to 32 locals we&#8217;d either be limited in the size of the array or use a three byte bytecode.  Neither of these is a win.  A bytecode that does both Push (Array new: kkkkkkk) and Pop kkkkkkk into: (Array new: kkkkkkk) is more flexible and just as compact because we frequently get to use the short-form for the following popIntoTemp.<\/p>\n<p><i>Answer, if the compiler used the same approach for very large brace expressions  then for one thing we&#8217;d need a lot of braceWith:&#8230;&#8230;with: methods, but more importantly we&#8217;d soon get stack overflow given the small finite stack size of Smalltalk&#8217;s contexts.  So large brace expressions are compiled to stream code that is equivalent to<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Array braceStream: N) nextPut: expr1; nextPut: expr2; nextPut: expr3; &#8230; nextPut: exprN<br \/>\nand the closure compiler limits itself to 8 elements before using the stream implementation.<\/i><\/p>\n<p>Now the Push Temp At m In Temp Vector At: n opcode.  In a moment of weakness I decided to go for a short-form here.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;139 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001011 jjjjkkkk \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Temp At kkkk In Temp Vector At: jjjj<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;140 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001100 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<\/p>\n<p>But then I recovered my sanity.  There were only 2700 occurrences of the short form in my image, which is about a 0.01% saving.  The unused bytecode is probably much more valuable.  But this explains the mysterious gap in the new bytecodes at 139.  So the opcode&#8217;s bytecode is<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;140 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001100 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<\/p>\n<p>This fetches the local at offset j..j on the stack and push the k..k&#8217;th element in it.<\/p>\n<p>The next two store into the k..k&#8217;th element of the local at j..j, one version popping the result off the stack.  This is a general convention in the Smalltalk-80 compiler.  These are store and store-pop forms of almost every store opcode.  The store form is used in the stores into vat and vax in things like<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var := vat := vax := expr<br \/>\nwhereas the pop form gets used in the store into var.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;141 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001101 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;142 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001110 kkkkkkkk jjjjjjjj \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pop and Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj<\/p>\n<p>The final bytecode is more interesting.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;143 \t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10001111 llllkkkk jjjjjjjj iiiiiiii\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push Closure Num Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii<\/p>\n<p>This creates a closure, initializing it from the arguments and the current context.  Because I&#8217;m doing The Simplest Thing That Could Possibly Work this is very closely modelled on the old BlockContext scheme.  We don&#8217;t use a separate method for the block&#8217;s code.  Instead we embed the code for a block within the code for its enclosing block or method. This has pros and cons.  Its arguably more compact because blocks and methods get to share literals if they access the same ones, and because there is only one CompiledMethod object, but this is offset by the fact that we will need larger ranges and hence more long-form bytecodes to access the literals because the CompiledMethod&#8217;s literal frame contains the literals for the method and its blocks.<\/p>\n<p>In the old scheme a block is created by sending blockCopy: to the active context with the block&#8217;s argument count as its argument and then jumping around the bytecodes for the block.  The primitive for blockCopy: takes into account the size of the jump and the compiler always generates a 2 byte jump.  Its a hack but it works:<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20 &lt;89&gt; pushThisContext<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;21 &lt;76&gt; pushConstant: 1<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22 &lt;C8&gt; send: blockCopy:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23 &lt;A4 08&gt; jumpTo: 33<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230; the bytecodes for the block &#8230;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;33     &#8230; the continuation of the method &#8230;<\/p>\n<p>The bytecode set has short forms for push -1, 0, 1 and 2 where you see &lt;76&gt; being used above  but if a block has more than 2 arguments then we need 4 bytes for the literal as well as the push.  But we&#8217;ll say that creating a block costs 5 bytecodes.  One problem is that the long jump only has a 10-bit range so we can&#8217;t have blocks with more than 1023 bytes of bytecode in them.  Collapsing these 4 separate bytecodes down into 1 multibyte code saves time and space, and easily allows a 16-bit jump size. <\/p>\n<p>So now the same block creation code compiles to the following bytecode:<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;27 &lt;8F 21 00 09&gt; closureCopyNumCopied: 2 numArgs: 1 bytes 31 to 40<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230; the bytecodes for the block &#8230;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;40     &#8230; the continuation of the method &#8230;<\/p>\n<p>We&#8217;ve gained a byte.  The above looks worse (its our old friend Collection&gt;&gt;inject:into: which uses those bulky indirect temp bytecodes).  In the common case we save, but any savings are offset by the bytecodes to push copied temps.  We&#8217;ll gather full measurements in the next post.<\/p>\n<p><H2>Implementing the Closure Bytecodes at the Image Level<\/H2><\/p>\n<p>To implement a new bytecode one needs to alter a few parts of the system.  One place is the VM.  We&#8217;ll do that at the end of this post.  There are two main places in the image.  One is the compiler, to generate the bytecode.  I&#8217;m going to defer discussing the compiler changes for now because there are enough changes to justify a post on its own. Another is in the execution simulation machinery which is used for several things<br \/>\n&#8211; implementing the debugger<br \/>\n&#8211; implementing the decompiler<br \/>\n&#8211; implementing method disassembling<br \/>\n&#8211; implementing browser support<\/p>\n<p>This all revolves around InstructionStream which is the class that manages the interpretation of bytecoded methods at the image level, the image&#8217;s dual of the VM itself.<\/p>\n<p><font color=\"#000000\">Object <\/font><font color=\"#00007F\">subclass:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#InstructionStream<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">instanceVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;sender pc&#8217;<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">classVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;SpecialConstants&#8217;<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">poolDictionaries:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8221;<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">category:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;Kernel-Methods&#8217;<\/p>\n<p><\/font><\/font>InstructionStream interprets bytecodes in two methods<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>interpretNextInstructionFor:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Send to the argument, client, a message that specifies the type of the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next instruction.&quot;<\/font><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>interpretExtension:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><b>in:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">method<\/font><font color=\"#000000\"> <\/font><b>for:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"><br \/>\nthe latter takes care of the decoding of bytecodes 128 through 143 which are complex enough to need their own method.  The interpretation causes the sending of messages to the client, one per opcode.  Here&#8217;s the entire opcode set for Smalltalk-80.  As you can see its a small set, and more or less each opcode corresponds to a single token in the source language.  InstructionClient is an abstract superclass for classes that implement these opcodes:<\/p>\n<p><\/font><font color=\"#000000\"><i>InstructionStream methods for instruction decoding<\/i><\/font><font color=\"#000000\"><br \/>\n<\/font><b>blockReturnTop<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Return Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>doDup<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Duplicate Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>doPop<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Remove Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n<\/font><br \/>\n<b>jump:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Unconditional Jump bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>jump:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Unconditional Jump bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>methodReturnConstant:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">value<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Return Constant bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>methodReturnReceiver<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Return Self bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>methodReturnTop<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Return Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>popIntoLiteralVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">anAssociation<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Remove Top Of Stack And Store Into Literal Variable bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>popIntoReceiverVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Remove Top Of Stack And Store Into Instance Variable bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>popIntoTemporaryVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Remove Top Of Stack And Store Into Temporary Variable bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushActiveContext<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Active Context On Top Of Its Own Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushConstant:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">value<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Constant, value, on Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushLiteralVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">anAssociation<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Contents Of anAssociation On Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushReceiver<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Active Context&#8217;s Receiver on Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushReceiverVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Contents Of the Receiver&#8217;s Instance Variable Whose Index<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is the argument, offset, On Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>pushTemporaryVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Contents Of Temporary Variable Whose Index Is the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; argument, offset, On Top Of Stack bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>send:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">selector<\/font><font color=\"#000000\"> <\/font><b>super:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">supered<\/font><font color=\"#000000\"> <\/font><b>numArgs:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numberArguments<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Send Message With Selector, selector, bytecode. The argument,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supered, indicates whether the receiver of the message is specified with<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8216;super&#8217; in the source method. The arguments of the message are found in<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the top numArguments locations on the stack and the receiver just<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; below them.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>storeIntoLiteralVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">anAssociation<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Store Top Of Stack Into Literal Variable Of Method bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>storeIntoReceiverVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Store Top Of Stack Into Instance Variable Of Method bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p><\/font><b>storeIntoTemporaryVariable:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Store Top Of Stack Into Temporary Variable Of Method bytecode.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>I&#8217;m shoe-horning the closure bytecodes into the unused extensions, so I need to modify the <\/font><b>interpretExtension:in:for:<\/b><font color=\"#000000\"> method, <\/font>Because we now have a four byte bytecode for the Push Closure Num Args M BlockSize N opcode we need a new temp at the beginning of the method:<\/p>\n<p><i>InstructionStream methods for private<\/i><br \/>\n<b>interpretExtension:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><b>in:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">method<\/font><font color=\"#000000\"> <\/font><b>for:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">type<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">offset2<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte4<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230; code for offset 0 through 6 omitted &#8230;<br \/>\n<font color=\"#000000\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">7<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">doPop<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">8<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">doDup<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">9<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushActiveContext<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">method<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> pc. pc <\/font><b>:=<\/b><font color=\"#000000\"> pc <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">10<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^<\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">128<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">[<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushNewArrayOfSize:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">[<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushConsArrayWithElements:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">128<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">11<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">error:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;unusedBytecode&#8217;<\/font><\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">method<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> pc.  pc <\/font><b>:=<\/b><font color=\"#000000\"> pc <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">12<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushRemoteTemp:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inVectorAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">13<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storeIntoRemoteTemp:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inVectorAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">14<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">popIntoRemoteTemp:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inVectorAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;offset = 15&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">byte4<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">method<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> pc.  pc <\/font><b>:=<\/b><font color=\"#000000\"> pc <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#00007F\">client<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">pushClosureCopyNumCopiedValues:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitShift:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">-4<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">numArgs:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">byte2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">16rF<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">blockSize:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">byte3<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">256<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">byte4<\/font><\/p>\n<p>The new opcodes need to be added to InstructionClient.  The next place is to InstructionPrinter, which does disassembly of CompiledMethods:<\/p>\n<p><b>popIntoRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Remove Top Of Stack And Store Into Offset of Temp Vector bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;popIntoTemp: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; inVectorAt: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<br \/>\n<\/font><br \/>\n<b>pushClosureCopyNumCopiedValues:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\"> <\/font><b>numArgs:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\"> <\/font><b>blockSize:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockSize<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Closure bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;closureNumCopied: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; numArgs: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; bytes &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> scanner <\/font><font color=\"#00007F\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; to &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> (scanner <\/font><font color=\"#00007F\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockSize<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">printString<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;innerIndents<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">atAll:<\/font><font color=\"#000000\"> (scanner <\/font><font color=\"#00007F\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> scanner <\/font><font color=\"#00007F\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockSize<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (innerIndents <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> scanner <\/font><font color=\"#00007F\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/p>\n<p><\/font><b>pushConsArrayWithElements:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Cons Array of size numElements popping numElements items from the stack into the array bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;pop &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; into (Array new: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;)&#8217;<\/p>\n<p><\/font><\/font><b>pushNewArrayOfSize:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push New Array of size numElements bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;push: (Array new: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;)&#8217;<\/p>\n<p><\/font><\/font><b>pushRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Push Contents at Offset in Temp Vector bytecode.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;pushTemp: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; inVectorAt: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<\/p>\n<p><\/font><b>storeIntoRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">print:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;storeIntoTemp: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString,<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216; inVectorAt: &#8216;<\/font><\/font><font color=\"#00007F\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">printString<\/font><font color=\"#000000\"><\/p>\n<p>and now I can see what Collection&gt;&gt;inject:into: looks like:<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/ClosureCompiled-injectInto-explorer.jpeg\" alt=\"Explorer on closure-compiled Collection&gt;&gt;inject:into:\" \/><\/p>\n<p>Then we have to implement them in ContextPart, MethodContext and BlockContext, the three classes that define the image-level interpreter.  The debugger uses these definitions to simulate execution.<\/p>\n<p><i>ContextPart methods for instruction decoding<\/i><br \/>\n<b>popIntoRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Simulate the action of bytecode that removes the top of the stack and  stores<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it into an offset in one of my local variables being used as a remote temp vector.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop<\/p>\n<p><\/font><b>pushClosureCopyNumCopiedValues:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\"> <\/font><b>numArgs:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\"> <\/font><b>blockSize:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockSize<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Simulate the action of a &#8216;closure copy&#8217; bytecode whose result is the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new BlockClosure for the following code&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&gt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#00007F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">by:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">-1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">i<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">]<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">nil<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">push:<\/font><font color=\"#000000\"> (BlockClosure <\/font><font color=\"#00007F\">new<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">outerContext:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">startpc:<\/font><font color=\"#000000\"> pc<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">numArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">copiedValues:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">jump:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockSize<\/p>\n<p><\/font><b>pushConsArrayWithElements:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">numElements<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">by:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">-1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#00007F\">i<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">push:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">array<\/p>\n<p><\/font><b>pushNewArrayOfSize:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">arraySize<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">push:<\/font><font color=\"#000000\"> (Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">arraySize<\/font><font color=\"#000000\">)<\/p>\n<p><\/font><b>pushRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Simulate the action of bytecode that pushes the value at remoteTempIndex<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in one of my local variables being used as a remote temp vector.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">push:<\/font><font color=\"#000000\"> (<\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">)<\/p>\n<p><\/font><b>storeIntoRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Simulate the action of bytecode that stores the top of the stack at<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an offset in one of my local variables being used as a remote temp vector.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">top<br \/>\n<\/font><br \/>\nThis level is suitable for prototyping bytecodes. We can test real methods using the above definitions before we attempt to build a VM.  Here&#8217;s an example I used to do just that.  runSimulated: is the entry-point into the execution simulation machinery.<\/p>\n<p><font color=\"#000000\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| m |<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m := ((Parser new<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encoderClass: EncoderForV3PlusClosures;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parse: <\/font><font color=\"#000000\">&#8216;<\/font><font color=\"#000000\">foo: n <\/font><font color=\"#000000\">| nfib |<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfib := [:i| i &lt;= 1 ifTrue: [1] ifFalse: [(nfib value: i &#8211; 1) + (nfib value: i &#8211; 2) + 1]].<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000000\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^(1 to: n) collect: nfib<\/font><font color=\"#000000\">&#8216;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class: Object)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generate: #(0 0 0 0)).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ContextPart runSimulated: [#receiver withArgs: #(10) executeMethod: m] #(1 3 5 9 15 25 41 67 109 177)<\/font><\/p>\n<p>which looks like<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/nfibViaBlocksClosureCompiled.jpeg\" alt=\"nfib via closure-compiled blocks\" \/><\/p>\n<p>Using this one can test a new set of bytecodes entirely at the image level using the Smalltak debugger to fix problems; a little easier than descending into the VM.  Once InstructionStream, ContextPart, MethodContext and BlockContext changes are in place one has a good specification for the VM implementation proper in Interpreter.<\/p>\n<p><H2>Implementing the Closure Bytecodes in the Interpreter VM<\/H2><\/p>\n<p>The Squeak VM is implemented in an unusual way.  It is written in a subset of Smalltalk called <a href=\"http:\/\/wiki.squeak.org\/squeak\/2267\">Slang<\/a> which is subsequently translated to C via the <a href=\"http:\/\/wiki.squeak.org\/squeak\/2105\">VMMaker<\/a>.  The C code is then compiled to create the actual VM.  But the Slang code can be executed with a real Smalltalk image to allow debugging the VM in Smalltalk.  This is pretty cool and I&#8217;ve been using it a lot recently to create the Stack VM, of which more in subsequent posts.  Not everything works.  Some plugins do not (yet) function when run in Smalltalk.  So one can only debug the VM so far.  But in working on the Stack VM I was able to execute the first 195,000 bytecodes in Smalltalk and got a lot of the code working before having to go to C.  Very nice.<\/p>\n<p>So implementing the closure bytecodes in the Interpreter VM actually involves modifying the Slang Smalltalk code in the class Interpreter in the VMMaker package.  VMMaker isn&#8217;t in a normal release image.  You&#8217;ll have to download VMMaker, e.g. from SqueakMap.  If you&#8217;re not familiar with VMMaker please use Tim Rowledge&#8217;s page above as a starting point.  I&#8217;m not going to reiterate that information here.  And of course you can still read the code without producing your own VM.<\/p>\n<p>To implement closures at the VM level we need to<\/p>\n<ul>\n<li>&#8211; add the methods implementing the closure bytecodes and the BlockClosure value primitives\n<li>&#8211; modify the return bytecodes so that method return from within a closure activation still does a non-local return\n<li>&#8211; tell the VM what indices to use for the bytecdes and primitives\n<li>&#8211; tell the VM where to find class BlockClosure and what is its layout.\n<\/ul>\n<p>The latter two tasks are done by modifying methods on the class side of Interpreter.  There are methods two that define the bytecode and primitive tables.  I&#8217;ve elided much of the code for clarity. The changed entries are for bytecodes 138 through 142 and 143 and for primitives 200 through 229.  Along with the two closure value primitives I&#8217;ve added some compatibility primitives for Context access that we&#8217;ll need in the Stack VM.<\/p>\n<p><i>Interpreter class methods for initialization<\/i><br \/>\n<b>initializeBytecodeTable<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Interpreter initializeBytecodeTable&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Note: This table will be used to generate a C switch statement.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>BytecodeTable<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">256<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">table:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BytecodeTable<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">from:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(  <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">  <\/font><font color=\"#7F0000\">15<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushReceiverVariableBytecode<\/font><font color=\"#000000\">)<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">137<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushActiveContextBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">138<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushNewArrayBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">139<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">unknownBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">140<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushRemoteTempLongBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">141<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storeRemoteTempLongBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">142<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storeAndPopRemoteTempLongBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">143<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushClosureCopyCopiedValuesBytecode<\/font><font color=\"#000000\">)<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">208<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">255<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">sendLiteralSelectorBytecode<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;).<\/p>\n<p><\/font><b>initializePrimitiveTable<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;This table generates a C function address table use in primitiveResponse along with dispatchFunctionPointerOn:in:&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;NOTE: The real limit here is 2047 because of the method header layout but there is no point in going over the needed size&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>MaxPrimitiveIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">575<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>PrimitiveTable<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>MaxPrimitiveIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">table:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>PrimitiveTable<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">from:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Integer Primitives (0-19)&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveAdd<\/font><font color=\"#000000\">)<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;new closure primitives (were Networking primitives)&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">200<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureCopyWithCopiedValues<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">201<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValue<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;value&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">202<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValue<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;value:&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">203<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValue<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;value:value:&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">204<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValue<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;value:value:value:&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">205<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValue<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;value:value:value:value:&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">206<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveClosureValueWithArgs<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;valueWithArguments:&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">207<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">209<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;reserved for Cog primitives&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">210<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveAt<\/font><font color=\"#000000\">)\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Compatibility with Cog StackInterpreter Context primitives&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">211<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveAtPut<\/font><font color=\"#000000\">)\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Compatibility with Cog StackInterpreter Context primitives&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">212<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveSize<\/font><font color=\"#000000\">)\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Compatibility with Cog StackInterpreter Context primitives&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">213<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">219<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">) <\/font><font color=\"#007F7F\">&quot;reserved for Cog primitives&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Unassigned Primitives&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">575<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">)).<\/p>\n<p>The VM and image need to share a set of objects so that the VM can actually do anything.  This sharing is done using an Array containing all the objects needed by the VM at fixed indices.  The VM finds the specialObjectsArray in the first place through its offset in the image file, which is stored in the image file&#8217;s header. You can inspect it using<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Smalltalk specialObjectsArray<br \/>\nand the method that redefines it is SystemDictionary&gt;&gt;recreateSpecialObjectsArray.  The VM&#8217;s dual of this method is ObjectMemory class&gt;&gt;initializeSpecialObjectIndices.  We need to add class BlockClosure to the array at the image level and access it from the VM through the assigned index.  Note that the image&#8217;s indices are 1-relative while the VM&#8217;s are zero-relative.  Again I&#8217;ve elided code for clarity.<\/p>\n<p><\/font><font color=\"#000000\"><i>SystemDictionary methods for special objects<\/i><\/font><br \/>\n<b>recreateSpecialObjectsArray<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Smalltalk recreateSpecialObjectsArray&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;The Special Objects Array is an array of object pointers used by the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Squeak virtual machine. Its contents are critical and unchecked, so<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don&#8217;t even think of playing here unless you know what you are doing.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#00007F\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">50<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Nil false and true get used throughout the interpreter&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">nil<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">false<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">3<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">true<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">37<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> BlockClosure.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">49<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#aboutToReturn:through:<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">50<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">#run:with:in:<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Now replace the interpreter&#8217;s reference in one atomic operation&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">specialObjectsArray<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">become:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newArray<\/font><font color=\"#000000\"><\/p>\n<p><\/font><i>ObjectMemory class methods for initialization<\/i><font color=\"#000000\"><br \/>\n<\/font><b>initializeSpecialObjectIndices<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Initialize indices into specialObjects array.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>NilObject<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>FalseObject<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>TrueObject<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClassBlockClosure<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">36<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>SelectorAboutToReturn<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">48<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>SelectorRunWithIn<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">49<\/font><font color=\"#000000\">.<\/p>\n<p>Since BlockClosure is one of the execution classes it makes sense (to me) to define its layout along with MethodContext:<br \/>\n<\/font><br \/>\n<i>Interpreter class methods for initialization<br \/>\n<\/i><b>initializeContextIndices<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Class MethodContext&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>SenderIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>InstructionPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>StackPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">3<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClosureIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">4<\/font><font color=\"#000000\">. <\/font><font color=\"#007F7F\">&quot;N.B. Called receiverMap in the image.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">5<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>TempFrameStart<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">6<\/font><font color=\"#000000\">.  <\/font><font color=\"#007F7F\">&quot;Note this is in two places!&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Class BlockContext&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>CallerIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>BlockArgumentCountIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">3<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>InitialIPIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">4<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>HomeIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">5<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Class BlockClosure&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClosureStartPCIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClosureNumArgsIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\"><b>ClosureCopiedValuesIndex<\/b><\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">3<\/font><font color=\"#000000\"><\/p>\n<p>Now we can actually implement the bytecodes and primitives in the VM.  The bytecode implementations correspond one-to-one with the methods on ContextPart above except for the <\/font><font color=\"#000000\">pushNewArrayBytecode <\/font><font color=\"#000000\">which InstructionStream&gt;&gt;<\/font><font color=\"#000000\">interpretExtension:in:<\/font><font color=\"#000000\">for: demultiplexed into <\/font><font color=\"#000000\">ContextPart&gt;&gt;<\/font><font color=\"#000000\">pushConsArrayWithElements:<\/font><font color=\"#000000\"> &amp; <\/font><font color=\"#000000\">ContextPart&gt;&gt;<\/font><font color=\"#000000\">pushNewArrayOfSize:.<\/p>\n<p><\/font><i>Interpreter methods for stack bytecodes<\/i><font color=\"#000000\"><br \/>\n<\/font><b>pushNewArrayBytecode<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">popValues<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">popValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&gt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">127<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">127<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchNextBytecode<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">externalizeIPandSP<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">instantiateClass:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">splObj:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClassArray<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">indexableSize:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalizeIPandSP<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">popValues<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">i<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Assume: have just allocated a new Array; it must be young. Thus, can use unchecked stores.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalStackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#7F007F\">)<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPop:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">size<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPush:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">array<\/font><font color=\"#000000\"><\/p>\n<p>The <\/font><font color=\"#000000\">externalizeIPandSP\/internalizeIPandSP pair are confusing, not to mention being a pain in the proverbial.  But they have fair performance justification.  The VMMaker does a lot of inlining as it translates the Slang methods to C so that the bulk of the interpreter minus the primitives, and some less frequently evaluated support functions ends up being one very large C function about 5,000 lines long.  The interpreter needs to access its instructionPointer stackPointer and homeContext very often and would like the C compiler to put these in registers.  Some primitives, notably the process switch, block evaluation and perform primitives also need to access these variables, since these primitives create new method activations or switch between them.  The garbage collector also needs access since it may move the homeContext or the current method.<\/p>\n<p>I suppose one could attempt to inline everything but this might get rather unweildy.  The clever hack in the current Interpreter is to have two copies of these variables, the internal variables localIP, localSP and localHomeContext, which are local to the single interpreter function, and the global varables instructionPointer, stackPointer and homeContext which are accessible to primitives and garbage collector as required.  The C compiler will hopefully assign the local  variables to registers since they have function scope, but this leaes the poor VM programmer with the responsbility of copying the values to and forth between the two sets of varables at the right times, and knowing which ones to access when and where.  One of these times is around any allocation that could cause a garbage collection.<\/p>\n<p>The data movement bytecodes are simple and quite similar to their ContextPart duals:<\/p>\n<p><\/font><i>Interpreter methods for stack bytecodes<\/i><font color=\"#000000\"><br \/>\n<\/font><b>pushRemoteTempLongBytecode<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchNextBytecode<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushRemoteTemp:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inVectorAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVectorIndex<\/p>\n<p><\/font><b>pushRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">index<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">temporary:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPush:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">index<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\">)<br \/>\n<\/font><font color=\"#3F3F3F\"><br \/>\n<\/font><b>storeAndPopRemoteTempLongBytecode<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storeRemoteTempLongBytecode<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPop:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/p>\n<p><\/font><b>storeRemoteTempLongBytecode<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">tempVectorIndex<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchNextBytecode<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storeRemoteTemp:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">remoteTempIndex<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inVectorAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVectorIndex<\/p>\n<p><\/font><b>storeRemoteTemp:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">index<\/font><font color=\"#000000\"> <\/font><b>inVectorAt:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">temporary:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">tempVectorIndex<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">index<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempVector<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalStackTop<\/font><font color=\"#000000\">.<\/p>\n<p>Creating a closure is a little more involved.  The bytecode has to retrieve any copied values from the stack and put them in an Array.  It then has to create the closure and jump around the closure&#8217;s bytecodes, just as the existing BlockContext implementation does.   The implementatin is split into two functions since there is a primitive for creating closures also and the bytecode and primitive can share code.<\/p>\n<p><\/font><i>Interpreter methods for stack bytecodes<\/i><font color=\"#000000\"><br \/>\n<\/font><b>pushClosureCopyCopiedValuesBytecode<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;The compiler has pushed the values to be copied, if any.  Find numArgs and numCopied in the byte following.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pop numCopied values off the stack int an Array (or use nil if none).  Create a Closure with the copiedValues<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and numArgs so specified, starting at the pc following the block size and jump over that code.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgsNumCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numArgsNumCopied<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgsNumCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">16rF<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgsNumCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitShift:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">-4<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&gt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#007F7F\">&quot;self assert: numCopied * BytesPerWord &lt;= 252.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">externalizeIPandSP<\/font><font color=\"#000000\">. <\/font><font color=\"#007F7F\">&quot;This is a pain.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">instantiateSmallClass:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">splObj:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClassArray<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">sizeInBytes:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BytesPerWord<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalizeIPandSP<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F00\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#00007F\">i<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Assume: have just allocated a new Array; it must be young. Thus, can use unchecked stores.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalStackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#7F007F\">)<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPop:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushRemappableOop:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Split offset := (self fetchByte * 256) + self fetchByte. into two because evaluation order in C is undefined.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">256<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">externalizeIPandSP<\/font><font color=\"#000000\">. <\/font><font color=\"#007F7F\">&quot;This is a pain.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">closureCopyNumArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">instructionPointer:<\/font><font color=\"#000000\"> (<\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">cCoerce:<\/font><font color=\"#000000\"> localIP <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\"><font size=\"0.9\" face=\"'Accuny'\">&#8216;sqInt&#8217;<\/font><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#000000\">method<\/font><font color=\"#00007F\">+<\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reclaimableContextCount <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\">. <\/font><font color=\"#007F7F\">&quot;The closure refers to thisContext so it can&#8217;t be reclaimed.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&gt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">popRemappableOop<\/font><font color=\"#000000\">]<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"> [<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> nilObj].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureCopiedValuesIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalizeIPandSP<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;localIP <\/font><b>:=<\/b><font color=\"#000000\"> localIP <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchNextBytecode<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">internalPush:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"><\/p>\n<p>The pushRemappableOop:\/popRemappableOop pairs are also confusing and a pain in the proverbial.  Since, in the current Interpreter, any allocation can invoke the garbage collector, intermediate objects must be handled carefully if the garbage collector may potentially move them.  The painfully error-prone solution is to require the programmer to store intermedate objects in a &quot;remap&quot; buffer prior to any allocation.  The garbage collector updates the remap buffer if invoked.  After any allocation the programmer must remember to retrieve the intermediate objects.  What is error-prone is that it is not necessarily obvious when a function call might include an allocation.  It is obvious for the allocation functons, but not at all obvous in e.g. primitivePerform. that calling <\/font><font color=\"#000000\">findNewMethodInClass: will potentially cause a garage collection creating a message if the send is not understood, a bug that has lurked undetected for some time.  Conseqently the <\/font><font color=\"#000000\">pushRemappableOop:\/popRemappableOop scheme is something that the StackVM is  far less dependent upon. <\/font><font color=\"#00007F\"><br \/>\n<\/font><font color=\"#000000\"><br \/>\nThe computation of offset above us split into two lines.  We&#8217;d rather write it as<\/font><font color=\"#007F7F\"><br \/>\n<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">offset<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">256<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchByte<\/font><font color=\"#000000\">.<\/p>\n<p>which is fine in Smalltalk because of its well-defined left-to-right execution order.  But this would translate to<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset = <\/font>((byteAtPointer(++localIP)) * 256) + byteAtPointer(++localIP);<font color=\"#000000\"><\/p>\n<p>which isn&#8217;t well-defined in C.<\/p>\n<p><\/font><i>Interpreter methods for control primitives<\/i><font color=\"#000000\"><br \/>\n<\/font><b>closureCopyNumArgs:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\"> <\/font><b>instructionPointer:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">initialIP<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">inline:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">true<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">instantiateSmallClass:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">splObj:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClassBlockClosure<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">sizeInBytes:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>BytesPerWord<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">4<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Assume: have just allocated a new closure; it must be young. Thus, can use unchecked stores.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;N.B. It is up to the caller to store the copiedValues!&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> activeContext.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureStartPCIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">integerObjectOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">initialIP<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUnchecked:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureNumArgsIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">integerObjectOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">numArgs<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"><\/p>\n<p>The primitive counterpart to the closure creation bytecode shares the above.  It is much simpler since it gets its parameters as arguments.<\/p>\n<p><\/font><i>Interpreter methods for control primitives<\/i><font color=\"#000000\"><br \/>\n<\/font><b>primitiveClosureCopyWithCopiedValues<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;self assert: (self stackValue: 2) == activeContext.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">stackIntegerValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;successFlag <\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">closureCopyNumArgs:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numArgs<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;greater by 1 due to preIncrement of localIP&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">instructionPointer:<\/font><font color=\"#000000\"> instructionPointer <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> (method<\/font><font color=\"#00007F\">+<\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">stackTop<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">storePointerUncheckedAsserting:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureCopiedValuesIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">3<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">thenPush:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newClosure<br \/>\n<\/font><font color=\"#000000\"><\/p>\n<p>Then there are the two closure evaluation primitives, primitiveClosureValue &amp; primitiveClosureValueWithArgs. <\/font> We need only look at one here as they&#8217;re quite similar.<\/p>\n<p><i>Interpreter methods for control primitives<br \/>\n<\/i><b>primitiveClosureValue<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockArgumentCount<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">blockClosure<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">stackValue:<\/font><font color=\"#000000\"> argumentCount.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">blockArgumentCount<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">argumentCountOfClosure:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;argumentCount <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockArgumentCount<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Somewhat paranoiac checks we need while debugging that we may be able to discard<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in a robust system.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">isContext:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Check if the closure&#8217;s method is actually a CompiledMethod.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">isNonIntegerObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">[<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">isCompiledMethod:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Check if copiedValues is either nil or anArray.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureCopiedValuesIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">==<\/font><font color=\"#000000\"> nilObj <\/font><font color=\"#00007F\">or:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">[<\/font><font color=\"#7F007F\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchClassOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#7F007F\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">splObj:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClassArray<\/b><\/font><font color=\"#7F007F\">)<\/font><font color=\"#007F00\">]<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">primitiveFail<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">activateNewClosureMethod:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">blockClosure<\/p>\n<p><\/font><font color=\"#000000\">Activating the method is very similar to activating a method for a message send (see activateNewMethod).  The main difference is that closure activation pushes any copied vaues and does not initialize temporaries, leaving it to bytecodes inserted by the compiler to do that (<a href=\"http:\/\/c2.com\/xp\/DoTheSimplestThingThatCouldPossiblyWork.html\">TSSTCPW<\/a>).  Another simplification is that if a method or any block within it needs a large context (becaue it has a large stack) then all blocks within it do also.<br \/>\n<\/font><font color=\"#3F3F3F\"><br \/>\n<\/font><i>Interpreter methods for control primitives<\/i><font color=\"#3F3F3F\"><br \/>\n<\/font><b>activateNewClosureMethod:<\/b><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockClosure<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Similar to activateNewMethod but for Closure and newMethod.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">headerOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureMethod<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pushRemappableOop:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">blockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">allocateOrRecycleContext:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>LargeContextBit<\/b><\/font><font color=\"#000000\">). <\/font><font color=\"#007F7F\">&quot;All for one, and one for all!&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;allocateOrRecycleContext: may cayse a GC; restore blockClosure and refetch outerContext et al&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">popRemappableOop<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureCopiedValuesIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Should evaluate to 0 for nilObj&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchWordLengthOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Assume: newContext will be recorded as a root if necessary by the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call to newActiveContext: below, so we can use unchecked stores.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\">  <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>SenderIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> activeContext.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>InstructionPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureStartPCIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>StackPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">integerObjectOf:<\/font><font color=\"#000000\"> argumentCount <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>ClosureIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">theBlockClosure<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">outerContext<\/font><font color=\"#000000\">).<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Copy the arguments&#8230;&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> argumentCount <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F007F\">(<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#00007F\">+i<\/font><font color=\"#7F007F\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">stackValue:<\/font><font color=\"#000000\"> argumentCount<\/font><font color=\"#00007F\">-i<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Copy the copied values&#8230;&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#007F00\">(<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> argumentCount<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">numCopied<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&#8211;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#00007F\">i<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">copiedValues<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;The initial instructions in the block nil-out remaining temps.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop:<\/font><font color=\"#000000\"> argumentCount <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">newActiveContext:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newContext<\/p>\n<p><\/font><font color=\"#000000\">We do have to make one crucial change to activateNewMethod and internalActvateNewMethod (because yes, dear reader, the local vs global variable scheme necessitates that there be two almost identical versions of them).  Now that the VM is using the old receiverMap slot, now the closure slot, it must be set to nil on method activation.  Here&#8217;s actvateNewMethod, which you can compare to <\/font>activateNewClosureMethod:.<font color=\"#000000\"><\/p>\n<p><\/font><i>Interpreter methods for message sending<br \/>\n<\/i><b>activateNewMethod<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">initialIP<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempCount<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">nilOop<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">headerOf:<\/font><font color=\"#000000\"> newMethod.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">allocateOrRecycleContext:<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>LargeContextBit<\/b><\/font><font color=\"#000000\">).<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">initialIP<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> (<\/font><font color=\"#007F00\">(<\/font><font color=\"#3F3F3F\"><b>LiteralStart<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F007F\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">literalCountOfHeader:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#7F007F\">)<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BytesPerWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">tempCount<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\">methodHeader<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&gt;&gt;<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">19<\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">16r3F<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Assume: newContext will be recorded as a root if necessary by the<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call to newActiveContext: below, so we can use unchecked stores.&quot;<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\">  <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\">  <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>BaseHeaderSize<\/b><\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>SenderIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> activeContext.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>InstructionPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">integerObjectOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">initialIP<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>StackPointerIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> (<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">integerObjectOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempCount<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>MethodIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> newMethod.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> (<\/font><font color=\"#3F3F3F\"><b>ClosureIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#000000\">) <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> nilObj.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;Copy the reciever and arguments&#8230;&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> argumentCount <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F007F\">(<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#00007F\">+i<\/font><font color=\"#7F007F\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">stackValue:<\/font><font color=\"#000000\"> argumentCount<\/font><font color=\"#00007F\">-i<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#007F7F\">&quot;clear remaining temps to nil in case it has been recycled&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">nilOop<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> nilObj.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;argumentCount<\/font><font color=\"#00007F\">+<\/font><font color=\"#7F0000\">1<\/font><font color=\"#00007F\">+<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">tempCount<\/font><font color=\"#00007F\">+<\/font><font color=\"#3F3F3F\"><b>ReceiverIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">longAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">where<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#007F00\">(<\/font><font color=\"#00007F\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">&lt;&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ShiftForWord<\/b><\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">nilOop<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">pop:<\/font><font color=\"#000000\"> argumentCount <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reclaimableContextCount <\/font><b>:=<\/b><font color=\"#000000\"> reclaimableContextCount <\/font><font color=\"#00007F\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">newActiveContext:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">newContext<\/font><font color=\"#000000\"><\/p>\n<p>Finally we have to make sure that non-local return still functions.  This turns out ot be very easy since the existing code uses Interpreter&gt;&gt;sender to discover the contet to return to. Prior to closures its implementation is<\/p>\n<p><\/font><i>Interpreter methods for contexts<\/i><font color=\"#000000\"><br \/>\n<\/font><b>sender<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^<\/font><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>SenderIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> localHomeContext<\/p>\n<p>This changes if the active context is a closure.  If so the lexical chain has to be walked to find the outermost (method) activation:<\/p>\n<p><\/font><i>Interpreter methods for contexts<\/i><font color=\"#000000\"><br \/>\n<\/font><b>sender<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">context<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureOrNil<\/font><font color=\"#000000\"> <\/font><font color=\"#7F7F7F\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#3F3F3F\">context<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> localHomeContext.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#007F00\">(<\/font><font color=\"#3F3F3F\">closureOrNil<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">context<\/font><font color=\"#007F00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">~~<\/font><font color=\"#000000\"> nilObj] <\/font><font color=\"#00007F\">whileTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#3F3F3F\">context<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#7F0000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>ClosureOuterContextIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">closureOrNil<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#7F0000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">fetchPointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\"><b>SenderIndex<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#00007F\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#3F3F3F\">context<\/font><font color=\"#000000\"><\/p>\n<p>Voila, closures in the VM.  Performance appears to be no worse than the BlockContext scheme.  The VM can run old and new images alike, and mix closure and blue-book block code side-by-side, simplifying the next step in the bootstrap, which is to recompile the system using closures.  Which brings us to the next post which will cover the bytecode compiler for closures.  And which brings us to the code for the scheme so far.  The bootstrap is in <a href=\"http:\/\/www.mirandabanda.org\/files\/Cog\/Closures0808\/Bootstrap\/\">www.mirandabanda.org\/files\/Cog\/Closures0808\/Bootstrap\/<\/a>.  Warning, this is for brave and hardy souls only, and has been tested only for Croquet.1.0.18 and Squeak3.9-final-7067.  Enjoy!<\/body><\/html><\/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=\"MzQEAA==\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"c87JLy4tSi1WCEgsKlHw9FRQU7YwMjS0VijJSFVwqixJTc5PSS0GAA==\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"FcRLDoAgDAXAE5VH2Gi8DZ8GSdCSUkO8vXEWc5qNA1hruatpvEtMf060IktNXSqC9zv8hhCQu8xHedKIatQa2cmUXuMshSc+\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"S0zJzcwDAA==\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwsNA1MNc1MlIwtLAyMLcyMQQA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7X15cxs5suff+z4Fnju2R5qWKFHySdt6oda0t7XbtrUtjx0bHZ4IkARJWMUCuw7RnDfvffbNA6iDpEiqisVDomdalskqHIlEIpHHL98Mzt70or4HP5Vsn7054r+apj06u4xC0VTKF1IMe9pTItR+S4mop4Qnw0gMTBjVhLj88YeXJ\/UXr28VPz00wY32u8L49GgYydaN+PxeSL9NH7Q8E8YBPGxMFEaBHEAbP8eR0NBdT3d7ItJ9JS6pedUWfQPPmk7uVd0feKqv\/EhG2vjw\/vnAeKarVSg6JqBH28qTo9qbo8HZv70ZnF3yWLBJGGQHm6QpDGF8cphru61C3fWF9sWF6dKgcWCDwEQmGg3G+xayaWDi0hex3zdt3dEw5M\/v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pukMO\/07tQcRYqGarsIWItMmz2HuQ2nN03v4eM0LE6kBc23IwNLzGQ+OBGY4xspeoHqvH3Si6JB4+hoOBzW+joA8skm\/qiZoHvUgVGERxeme2SlSXj88vjl0c+urSM4Bwq99+ZIniGdZIDOCMwLxlGx2twM8I6L69iTQRtupib24M7qe6MD+6n1UEQKqN+mb7h4fGD+jFVUq9eOa\/WX9Ow1fCBvTmuvDjt4hz58cfz8BfT7i\/\/NjP4dNpxpj4Che1HfY77+\/w==\" \/> \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>Its been a while since the last post. I&#8217;ve been working on the stack VM and the closure bootstrap. But its high time I posted more of the closure implementation. Apologies for the delay. In the post before last we saw the closure design in Cog and its prototype implementation above an unmodified VM. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/11"}],"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=11"}],"version-history":[{"count":2,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":25,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/11\/revisions\/25"}],"wp:attachment":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}