Maybe look at the coroutine implementation in Go (Golang).

Maybe a better refrence.  Maybe an optional switch in compiler so
you are not required to have all CPU architectures working on day 1.

Intel and ARM seem nice...

md

On 3/21/2015 4:29 PM, Marco van de Voort wrote:
In our previous episode, Mark Morgan Lloyd said:
Efficient implementation of coroutines requires CPU-specific code in the
RTL and possibly the compiler. However
http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html suggests a
way that coroutines can be implemented in a portable fashion in C, how
can this be done in Object Pascal?

Seems more an oddity than a system, but it relies heavily on preprocessor
and fallthrough case.

The preprocessor part can be done, just use whatever preprocessor
(maybe even cpp) and then haul the resulting code through fpc.

But there is no fallthrough case (and personally I think that is a good
thing)
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to