Re: Stack frames & static predecessors

Tomasz Kowaltowski <tk@ic.unicamp.br>
Fri, 24 Aug 2007 09:03:52 -0300

          From comp.compilers

Related articles
Stack frames & static predecessors wollenberg@web.de (Till Wollenberg) (2007-08-24)
Re: Stack frames & static predecessors torbenm@app-3.diku.dk (2007-08-24)
Re: Stack frames & static predecessors gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-08-24)
Re: Stack frames & static predecessors tk@ic.unicamp.br (Tomasz Kowaltowski) (2007-08-24)
Re: Stack frames & static predecessors bonzini@gnu.org (Paolo Bonzini) (2007-08-24)
Re: Stack frames & static predecessors gene.ressler@gmail.com (Gene) (2007-08-24)
Re: Stack frames & static predecessors anton@mips.complang.tuwien.ac.at (2007-08-25)
Re: Stack frames & static predecessors dnovillo@acm.org (Diego Novillo) (2007-08-25)
Re: Stack frames & static predecessors bobduff@shell01.TheWorld.com (Robert A Duff) (2007-08-25)
Re: Stack frames & static predecessors bobduff@shell01.TheWorld.com (Robert A Duff) (2007-08-25)
[1 later articles]
| List of all articles for this month |

From: Tomasz Kowaltowski <tk@ic.unicamp.br>
Newsgroups: comp.compilers
Date: Fri, 24 Aug 2007 09:03:52 -0300
Organization: IC/UNICAMP
References: 07-08-065
Keywords: code, Pascal
Posted-Date: 25 Aug 2007 10:36:14 EDT

compilers-owner@lists.iecc.com wrote:
> [The calling procedure passes in pointers to the stack frames of all
> of the lexically enclosing procedures, a structure known as a display.
> The code to create the display at each call point is tedious but not
> complex, and the techniques have been known since Algol 60, if not
> longer. This used to be a standard topic in compiler texts, at least
> until the academic world switched from Pascal to C. Take a look at the
> x86 ENTER instruction, which is specifically designed to create stack
> frames with displays. -John]


Instead of the explicit display which is usually a sequence of
registers you can use its equivalent which is the static chain of
pointers on the stack. This chain is necessary anyway because of other
implementation issues like procedure parameters.


-- tk



Post a followup to this message

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