[Vm-dev] Switching an active context in Cog
Igor Stasenko
siguctua at gmail.com
Mon Aug 16 16:42:03 UTC 2010
Hello,
i want to adopt an image-side scheduling for Cog and since
everything which sounds like 'Process' will be wiped out from VM,
i need a way to cleanly switch the active context to a new one.
I think that as a guide for implementation could be taken
CoInterpreter>>transferTo: newProc from: sourceCode
but i am a bit confused by following:
self push: instructionPointer.
...(switching code)...
instructionPointer := self popStack.
does that means, that instruction pointer is always stored in last
stack position
instead of some fixed slot of context?
--
Best regards,
Igor Stasenko AKA sig.
More information about the Vm-dev
mailing list