[fpc-pascal] Portable coroutines

rpzrpzrpz at gmail.com rpzrpzrpz at gmail.com
Sun Mar 22 00:50:47 CET 2015

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...


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 at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list