Re: The C Stack in interpreters - why?

Peter Flass <Peter_Flass@Yahoo.com>
14 May 2005 01:09:53 -0400

          From comp.compilers

Related articles
The C Stack in interpreters - why? clearm@comcast.net (2005-05-13)
Re: The C Stack in interpreters - why? Peter_Flass@Yahoo.com (Peter Flass) (2005-05-14)
Re: The C Stack in interpreters - why? haberg@math.su.se (2005-05-14)
Re: The C Stack in interpreters - why? clearm@comcast.net (2005-05-14)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-14)
Re: The C Stack in interpreters - why? anton@mips.complang.tuwien.ac.at (2005-05-14)
Re: The C Stack in interpreters - why? haberg@math.su.se (2005-05-14)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-14)
[8 later articles]
| List of all articles for this month |
From: Peter Flass <Peter_Flass@Yahoo.com>
Newsgroups: comp.compilers
Date: 14 May 2005 01:09:53 -0400
Organization: Road Runner
References: 05-05-072
Keywords: C, code
Posted-Date: 14 May 2005 01:08:39 EDT

If I'm understanding you correctly, it isn't the *C* stack, it's the
hardware stack, and is set up for efficiencies a programmed-stack
isnt't: PUSH and POP instructions, addressing via offsets from
ESP/EBP, etc. I'm obviously thinking of x86, but other architectures
offer similar instructions and addressing modes. Unless you have a
good reason, why fight the hardware?


clearm@comcast.net wrote:


> I am trying to understand why the C stack is used in interpreters
> rather than an explicity built stack on the heap? Up until now I
> presumed that the explicit stack was how everyone did it, then I
> learned that, apparently the way a lot of bytecode interpreters work
> is to recursively call themselves whenever a
> procedure/routine/method/whaterver is called. ...


> Can someone tell me why the C stack is so often used instead of
> explicit? ...


Post a followup to this message

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