Share this post! | Vote this! |
|
Stack
A stack holds the values used and computed during evaluation of an EDEN program.
When the machine calls a function, the parameters are pushed on the top of the stack. Actually, the parameters are merged to form a single list datum. If the function requires any local variable, the machine allocates space for their values. When the function returns, the allocated local variables and the arguments stored on the stack are poped; then the value is returned by pushing it onto the stack. See the figure below which shows the stack
- before a function is called,
- during a function call, the arguments having been pushed onto the stack, and
- after the function has returned, the arguments and local variables having been popped, and the answer pushed onto the stack.
0 comments:
Post a Comment