at http://www.mirandabanda.org/files/Cog/VM/VM.r3024/.

I had *forgotten* to implement following forwarders on primitive failure in machine code primitives, hence Cog Spur was badly broken. ��It's now a little bit better, but I still need to implement this for named primitives. ��Real soon now I hope...

CogVM source as per VMMaker.oscog-eem.791/r3024

Implement following forwarders on primitive failure in machine code interpreter
primitives (still have to implement this in sideways calls of named primitives).

Allow the JIT to not compile primitiveDoNamedPrimitiveWithArgs
to avoid any potential complications.

Rewrite all the semaphore installing primitives to fail if the semaphore arg is
neither a semaphore or nil instead of assuming if its not a semaphore it must be
nil, so as to fail and retry when semaphores are forwarded (as they are when
Semaphore is redefined).

Implement isSemaphoreOop:/Obj: in the object memories to abstract away the code.
Base Spur's on the class index of splObj: ClassSemaphore, avoiding the table
lookup to derive the class. ��Make checkForEventsMayContextSwitch: treat all its
semaphores consistently.

Have spur's fetchClassOfNonImm: answer nilObj for
forwarders to avoid assert fails.

On Spur add read barriers to primitiveSuspend and synchronousSignal:'s myList
access, because the process list manipulation routines do no checking. ��Add
assert checks for forwarders in the process list manipulation routines.

Fix slip in StackInterpreter>>actuallyFollowNecessaryForwardingInMethod:literalCount:
that corrupts the methodClassAssociation.

Abstract out the call machinery from compileTrampolineFor:numArgs:arg:arg:arg:-
arg:saveRegs:pushLinkReg:resultReg: so it can be used by
maybeCompileRetry:onPrimitiveFail: in implementing following forwarders on
primitive failure in machine code, and the Open PIC miss call.

Have bytecodePCFor:cogMethod:startBcpc: map any pc before the stackCheckOffset
to the initialPC, which applies to primitives in progress.

Fix assert fails in updateStateOfSpouseContextForFrame:WithSP:
and elsewhere with forwarders.

LargeIntegers Plugin:
Fix a latent signed shift bug in cDigitSub:len:with:len:into:
caused by VMMaker.oscog-eem.785's eliminating the
divide-via-shift optimization.

These changes allow Cog Spur to redefine Process and/or Semaphore and not hang.


--
best,
Eliot