[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basic parrot questions



On Mon, Dec 03, 2001 at 08:31:00AM -0800, Terrence Brannon wrote:
> Also, I thought Parrot was not "stack-based" If that is the case 
> then why does Overview.pod say this:
> 
> "Registers will be stored in register frames, which can be pushed and
> popped onto the register stack. For instance, a subroutine or a block
> might need its own register frame."

This describes the operation of a register based architecture.  That is,
the current state of the registers (register frame) are pushed and popped 
as necessary (typically upon function invocation).

A stack architecture does not have general purpose registers that
are individually addressable.  The Forth "VM" (implemented in
silicon by i-forget-whom) contains a stack of ~16 data and ~16 code
operands, and no registers.  There is no way to address the individual
contents of the stacks, save the topmost element (or two) of the stack.

Z.