<div dir="ltr">at <a href="http://www.mirandabanda.org/files/Cog/VM/VM.r3024/">http://www.mirandabanda.org/files/Cog/VM/VM.r3024/</a>.<div><div><br></div><div>I had *forgotten* to implement following forwarders on primitive failure in machine code primitives, hence Cog Spur was badly broken.  It&#39;s now a little bit better, but I still need to implement this for named primitives.  Real soon now I hope...</div>
<div><br></div><div>CogVM source as per VMMaker.oscog-eem.791/r3024<br></div><div><br></div><div>Implement following forwarders on primitive failure in machine code interpreter</div><div>primitives (still have to implement this in sideways calls of named primitives).</div>
<div><br></div><div>Allow the JIT to not compile primitiveDoNamedPrimitiveWithArgs</div><div>to avoid any potential complications.</div><div><br></div><div>Rewrite all the semaphore installing primitives to fail if the semaphore arg is</div>
<div>neither a semaphore or nil instead of assuming if its not a semaphore it must be</div><div>nil, so as to fail and retry when semaphores are forwarded (as they are when</div><div>Semaphore is redefined).</div><div><br>
</div><div>Implement isSemaphoreOop:/Obj: in the object memories to abstract away the code.</div><div>Base Spur&#39;s on the class index of splObj: ClassSemaphore, avoiding the table</div><div>lookup to derive the class.  Make checkForEventsMayContextSwitch: treat all its</div>
<div>semaphores consistently.</div><div><br></div><div>Have spur&#39;s fetchClassOfNonImm: answer nilObj for</div><div>forwarders to avoid assert fails.</div><div><br></div><div>On Spur add read barriers to primitiveSuspend and synchronousSignal:&#39;s myList</div>
<div>access, because the process list manipulation routines do no checking.  Add</div><div>assert checks for forwarders in the process list manipulation routines.</div><div><br></div><div>Fix slip in StackInterpreter&gt;&gt;actuallyFollowNecessaryForwardingInMethod:literalCount:</div>
<div>that corrupts the methodClassAssociation.</div><div><br></div><div>Abstract out the call machinery from compileTrampolineFor:numArgs:arg:arg:arg:-</div><div>arg:saveRegs:pushLinkReg:resultReg: so it can be used by</div>
<div>maybeCompileRetry:onPrimitiveFail: in implementing following forwarders on</div><div>primitive failure in machine code, and the Open PIC miss call.</div><div><br></div><div>Have bytecodePCFor:cogMethod:startBcpc: map any pc before the stackCheckOffset</div>
<div>to the initialPC, which applies to primitives in progress.</div><div><br></div><div>Fix assert fails in updateStateOfSpouseContextForFrame:WithSP:</div><div>and elsewhere with forwarders.</div><div><br></div><div>LargeIntegers Plugin:</div>
<div>Fix a latent signed shift bug in cDigitSub:len:with:len:into:</div><div>caused by VMMaker.oscog-eem.785&#39;s eliminating the</div><div>divide-via-shift optimization.</div><div><br></div><div>These changes allow Cog Spur to redefine Process and/or Semaphore and not hang.</div>
<div><br></div><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>