Re: Stack frames & static predecessors

"Diego Novillo" <dnovillo@acm.org>
Sat, 25 Aug 2007 12:24:09 -0400

          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)
Re: Stack frames & static predecessors DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-08-26)
| List of all articles for this month |
From: "Diego Novillo" <dnovillo@acm.org>
Newsgroups: comp.compilers
Date: Sat, 25 Aug 2007 12:24:09 -0400
Organization: Compilers Central
References: 07-08-065 07-08-072
Keywords: Pascal, code
Posted-Date: 25 Aug 2007 14:32:48 EDT

On 8/24/07, Gene <gene.ressler@gmail.com> wrote:


> For this purpose, each scope contains a pointer called a
> "static link" (vice the dynamic link, which always points to the next
> lexically enclosing scope, regardless of its lexical nesting).


This is roughly the strategy used by GCC. Once the program is
converted into GIMPLE (GCC's high-level IL), the nesting of functions
is decomposed using the static chain idea. See the file
<src>/gcc/tree-nested.c in a post 4.0 release of GCC.
(http://gcc.gnu.org/viewcvs/trunk/gcc/tree-nested.c?view=markup)


Also, you can ask GCC to dump the unnesting changes with -fdump-tree-nested.



Post a followup to this message

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