Re: Questions about Bytecode

Hans-Peter Diettrich <DrDiettrich1@aol.com>
23 Apr 2007 07:49:54 -0400

          From comp.compilers

Related articles
Questions about Bytecode Sean.D.Gillespie@gmail.com (Bison) (2007-04-18)
Re: Questions about Bytecode englere_geo@yahoo.com (Eric) (2007-04-19)
Re: Questions about Bytecode DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-19)
Re: Questions about Bytecode cfc@shell01.TheWorld.com (Chris F Clark) (2007-04-19)
Re: Questions about Bytecode Sean.D.Gillespie@gmail.com (Bison) (2007-04-20)
Re: Questions about Bytecode anton@mips.complang.tuwien.ac.at (2007-04-23)
Re: Questions about Bytecode ajohnson@mathworks.com (Andy Johnson) (2007-04-23)
Re: Questions about Bytecode DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-23)
Re: Questions about Bytecode haberg@math.su.se (2007-04-23)
Re: Questions about Bytecode chris.dollin@hp.com (Chris Dollin) (2007-04-23)
Re: Questions about Bytecode gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-04-25)
Re: Questions about Bytecode Peter_Flass@Yahoo.com (Peter Flass) (2007-04-26)
Re: Questions about Bytecode cdiggins@gmail.com (Christopher Diggins) (2007-04-26)
Re: Questions about Bytecode cdiggins@gmail.com (Christopher Diggins) (2007-04-26)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: 23 Apr 2007 07:49:54 -0400
Organization: Compilers Central
References: 07-04-06107-04-068 07-04-071
Keywords: interpreter

Bison wrote:


> I'm also wondering how labels are implemented in the bytecode.


What should be special with labels? Variables are locations in the data
space, labels are locations in the code space.




> And as a final side note, is it more common to see one stack or two
> stack machines. What benefits do they have?


With one stack you have one limit, with two stacks two limits. IMO.
Multiple stacks require according hardware support, an x86 has too few
registers for an efficient implementation of multiple stacks. And not
only for that purpose...


The answer depends on what you intend to do with the stack(s). Typically
a new stack frame is placed on the stack, when a subroutine or block is
entered. That frame contains all the local variables of the block. The
remaining stack is free for calculations and argument lists for
subroutine calls. On exit from the block, the stack frame and everything
below it is discarded.


DoDi



Post a followup to this message

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