Re: The C Stack in interpreters - why?

"scooter.phd@gmail.com" <scooter.phd@gmail.com>
18 May 2005 00:53:32 -0400

          From comp.compilers

Related articles
[9 earlier articles]
Re: The C Stack in interpreters - why? marcov@stack.nl (Marco van de Voort) (2005-05-14)
Re: The C Stack in interpreters - why? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-15)
Re: The C Stack in interpreters - why? gene@abhost.us (Gene Wirchenko) (2005-05-15)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-15)
Re: The C Stack in interpreters - why? gneuner2@comcast.net (George Neuner) (2005-05-16)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-16)
Re: The C Stack in interpreters - why? scooter.phd@gmail.com (scooter.phd@gmail.com) (2005-05-18)
| List of all articles for this month |

From: "scooter.phd@gmail.com" <scooter.phd@gmail.com>
Newsgroups: comp.compilers
Date: 18 May 2005 00:53:32 -0400
Organization: http://groups.google.com
References: 05-05-07205-05-073 05-05-084 05-05-100 05-05-122
Keywords: interpreter, design
Posted-Date: 18 May 2005 00:53:32 EDT

Real, but limited. Makes life interesting if you implement thread
support, as I saw a couple of years ago for a very popular cordless
telephone chip. Yes, very surprisingly, it has an enhanced 6502.
Besides, assembly is virtually the only way to go with 6502s anyway
since you have to be awfully careful with memory management. Frankly,
I still enjoyed doing it after all these years and the result got shot
off the back of the shuttle 2.5 years back (STS-113)


Back to the poster's original topic: if you don't use a stack, you
have to manage stack frames. PL/I does this, I suspect, because it fit
older segmented architectures better. So, if you don't want to
growstack(), you'll have to allocframe() and deal with other
issues. As another poster pointed out, managing call frames
potentially enables a raft of other feature.


However, managing a stack-based frame is essentially managing a call
frame. The principal difference is that a stack is contiguous and has
push/pop semantics. Thus, you can't necessarily move data around or
connect/reconnect nonadjacent stack frames without doing some
accounting.


-scooter


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.