| 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) |
| [9 later articles] |
| From: | clearm@comcast.net |
| Newsgroups: | comp.compilers |
| Date: | 13 May 2005 18:03:24 -0400 |
| Organization: | http://groups.google.com |
| Keywords: | code, question, C |
| Posted-Date: | 13 May 2005 18:03:24 EDT |
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.
Things I have been able to learn so far:
(1) A lot of languages use the C stack
(2) A lot of people complain about it and point out all of the
limitations of it.
Can someone tell me why the C stack is so often used instead of
explicit? People are willing to re-write entire interpreters in order
to get rid of the C stack (i.e. stackless python), so why do people use
the C stack for interpreters to begin with?
I am writing an interpreter and I need to know the best way to proceed
on this issue. I WOULD like to be able to embed my interpreter in C
programs and I WOULD like to be able to call C from my language.
Thanks!
MC
Return to the
comp.compilers page.
Search the
comp.compilers archives again.