Re: [fpc-pascal] Portable coroutines

2015-03-23 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 03/20/2015 11:09 PM, Mark Morgan Lloyd wrote: 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

Re: [fpc-pascal] Portable coroutines

2015-03-23 Thread Michael Schnell
On 03/20/2015 11:09 PM, Mark Morgan Lloyd wrote: 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

Re: [fpc-pascal] Portable coroutines

2015-03-22 Thread Mark Morgan Lloyd
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 implement

Re: [fpc-pascal] Portable coroutines

2015-03-22 Thread Mark Morgan Lloyd
rpzrpz...@gmail.com wrote: 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... The issue isn't the syntax, it's that proper

Re: [fpc-pascal] Portable coroutines

2015-03-22 Thread rpzrpz...@gmail.com
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 episo

Re: [fpc-pascal] Portable coroutines

2015-03-21 Thread Marco van de Voort
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 fas

[fpc-pascal] Portable coroutines

2015-03-20 Thread Mark Morgan Lloyd
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? -- M