Framed Stack vs. Two Stack Architecture
- From: "Avatar" <acampbellb@xxxxxxxxxxx>
- Date: 21 Apr 2006 23:49:01 -0400
Hello,
We are implementing a stack-based VM for a small interpretive
language. I am currently investigating stack architectures and would
like to better understand the advantages / dis-advantages of a
framed-stack vs. two stack approach.
I understand that the JVM architecture implements a framed-stack: one
frame per activation record (method call) with an embedded operand
stack. So essentially they have rolled the execution stack and operand
stack into one. Right?
I also understand that there are architectures (although I have been
unable to find a reference implementation for this) that maintain two
separate stacks: a execution (control) stack for function calls, and a
separate data stack for (bytecode) instruction evaluation.
The language we are implementing is dynamic in nature (dynamic typing
and alllows for on-the-fly code evaluation) so we would not have the
advantage that the JVM has in knowing the max stack depth (operand
stack) at compile time. At any point code can be evaluated on-the-fly
within a function. Which I am guessing would eliminate the
stacked-frame approach? As the frames need to be allocated to a
certain size (can't grow based upon the demands for operand stack
space).
Any thoughts on these two stack architectures would be greatly
appreciated?
Thanks
.
- Follow-Ups:
- Re: Framed Stack vs. Two Stack Architecture
- From: Anton Ertl
- Re: Framed Stack vs. Two Stack Architecture
- From: George Neuner
- Re: Framed Stack vs. Two Stack Architecture
- From: Hans-Peter Diettrich
- Re: Framed Stack vs. Two Stack Architecture
- From: Dmitry A. Kazakov
- Re: Framed Stack vs. Two Stack Architecture
- From: brennie
- Re: Framed Stack vs. Two Stack Architecture
- Prev by Date: minimizing vertex NFAs
- Next by Date: Re: Grammar generator
- Previous by thread: minimizing vertex NFAs
- Next by thread: Re: Framed Stack vs. Two Stack Architecture
- Index(es):
Relevant Pages
|
|