<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Very interesting, thanks.<br><br>I am running Squeak 4.0 and just loaded an early VMMaker that would load cleanly (VMMaker-tpr.10) so I could have access to the bytecode table and primitive source in Interpreter. <br><br><br><br><br><div id="1">---- On Sun, 15 Dec 2013 11:43:28 -0800 <b>Bob Arning&lt;arning315@comcast.net&gt;</b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px; margin:0 0 0 5px">               <div text="#000000" bgcolor="#FFFFFF">     <font face="Georgia">Not sure which version VM you are looking at,       but long ago, it was:<br>       <br>       primitiveValueWithArgs<br>       <br>       &nbsp;&nbsp;&nbsp; | argumentArray blockContext blockArgumentCount       arrayArgumentCount initialIP |<br>       &nbsp;&nbsp;&nbsp; argumentArray _ self popStack.<br>       &nbsp;&nbsp;&nbsp; blockContext _ self popStack.<br>       &nbsp;&nbsp;&nbsp; blockArgumentCount _ self argumentCountOfBlock: blockContext.<br>       &nbsp;&nbsp;&nbsp; self assertClassOf: argumentArray is: (self splObj:       ClassArray).<br>       &nbsp;&nbsp;&nbsp; successFlag ifTrue: [<br>       &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; arrayArgumentCount _ self fetchWordLengthOf:       argumentArray.<br>       &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; self success: (arrayArgumentCount = blockArgumentCount<br>       <b>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</b><b> and: [(self fetchPointer: CallerIndex         ofObject: blockContext) = nilObj])</b><b>].         &lt;&lt;&lt;re-entrant detection</b><b><br>       </b></font><b>.</b>..<br>     <br>     So, your snippet looks close, but not quite there.<br>     <br>     Cheers,<br>     Bob<br>     <br>     <div>On 12/15/13 11:25 AM, gettimothy wrote:<br>     </div>     <blockquote cite="mid:142f713b47e.-180723239<a href=" mailto:6217826968.4737877899933405100@zoho.com"="" target="_blank">6217826968.4737877899933405100@zoho.com" type="cite"&gt;       <pre wrap=""> </pre>       <br>       <fieldset></fieldset>       <br>              <div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif;">Please         shoot this down, if it is incorrect. (no details necessary, just         a yes,no is sufficient)<br>         <br>         In the <a href="http://www.mirandabanda.org/cogblog/category/cog/page/14/" target="_blank">discussion</a>on the re-entrant problem for BlockContexts regarding this         code:<br>         <br>         <font face="serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | factorial |<br>           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;factorial := [:n| n = 1 ifTrue: [1] ifFalse:           [(factorial value: n - 1) * n]].<br>           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(1 to: 10) collect: factorial</font><br>         <br>         This statement: "The block can’t be reentered without         overwriting the sender field, preventing return to the first         caller. "<br>         <br>         Does <b>not</b> mean that the bock is reentered, the sender         field is over-written and when we get to n=10 stage things go         kablooie.<br>         What happens is the coders detect this condition and the         primitive code&nbsp; will <b>not allow</b> a sender to be         over-written. <br>         The error that is thrown is <b>purposeful and defensive</b><br>         <br>         I don't know what I am looking at yet, but I think that error         check happens here:<br>         <br>         Interpreter &gt;&gt; primitiveValueWithArgs<br>         &nbsp;&nbsp;&nbsp; | argumentArray blockContext blockArgumentCount         arrayArgumentCount initialIP |<br>         &nbsp;&nbsp;&nbsp; argumentArray _ self popStack.<br>         &nbsp;&nbsp;&nbsp; blockContext _ self popStack.<br>         &nbsp;&nbsp;&nbsp; blockArgumentCount _ self argumentCountOfBlock:         blockContext.<br>         <b>&nbsp;&nbsp;&nbsp; "If the argArray isnt actually an Array we ahve to unpop           the above two"<br>           &nbsp;&nbsp;&nbsp; (self isArray: argumentArray) ifFalse: [self unPop:2.           ^self primitiveFail].<br>         </b>.....<br>         <br>         <br>         Sound about right?<br>         <br>         thx.<br>         <br>         tty<br>       </div>     </blockquote>     <br>    </div></blockquote><br></div></body></html>