Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.arch Subject: Re: Continuations Date: Tue, 16 Jul 2024 23:57:46 -0000 (UTC) Organization: A noiseless patient Spider Lines: 17 Message-ID: References: <47689j5gbdg2runh3t7oq2thodmfkalno6@4ax.com> <116d9j5651mtjmq4bkjaheuf0pgpu6p0m8@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 17 Jul 2024 01:57:46 +0200 (CEST) Injection-Info: dont-email.me; posting-host="61b3cac522dd69c264227f2208c927fc"; logging-data="1575358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19G0QtrHOE7Yzsy3tiNX5rS" User-Agent: Pan/0.158 (Avdiivka; ) Cancel-Lock: sha1:eTFD1586FIhW1n60PwOeUv3hkLg= Bytes: 1807 On Tue, 16 Jul 2024 17:17:57 +0000, MitchAlsup1 wrote: > Does a continuation in a block structured language NEED everything on > the block-stack, or is it more like 2-10 variables at rather well > defined locations ?? more like a functor than a continuation. My answer would be “it only needs to include what it needs”. Maybe in one instance it only needs a couple of integer variables, in another it might need a (gasp) multi-megabyte dynamic array. The only register contents the hardware needs to worry about would be: * the program counter * the pointer to the call frame itself and perhaps that’s it. Everything else (e.g. the concept of a “return address”) could be defined by the ABI.