Re: Is multi-level function return possible?

Bill Findlay <yaldnif.w@blueyonder.co.uk>
Fri, 14 Mar 2014 01:28:03 +0000

          From comp.compilers

Related articles
[2 earlier articles]
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-11)
Re: Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-11)
Re: Is multi-level function return possible? lkrupp@pssw.com (Louis Krupp) (2014-03-11)
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-11)
Re: Is multi-level function return possible? tkowaltowski@gmail.com (Tomasz Kowaltowski) (2014-03-12)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-13)
Re: Is multi-level function return possible? yaldnif.w@blueyonder.co.uk (Bill Findlay) (2014-03-14)
Re: Is multi-level function return possible? ivan@ootbcomp.com (Ivan Godard) (2014-03-13)
Re: Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-14)
Re: Is multi-level function return possible? gneuner2@comcast.net (George Neuner) (2014-03-14)
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-14)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-14)
Re: Is multi-level function return possible? kaz@kylheku.com (Kaz Kylheku) (2014-03-14)
[22 later articles]
| List of all articles for this month |

From: Bill Findlay <yaldnif.w@blueyonder.co.uk>
Newsgroups: comp.compilers
Date: Fri, 14 Mar 2014 01:28:03 +0000
Organization: Compilers Central
References: 14-03-020 14-03-022 14-03-025 14-03-027
Keywords: Pascal, comment
Posted-Date: 14 Mar 2014 13:34:18 EDT

> [Yes, it's lexically scoped. Pascal functions use displays, which
> keep the frame pointers of all of the lexically enclosing blocks with
> variables visible in a routine, which are filled in by chasing
> pointers to the calling function's display. So in case of recursion,
> the display has the most recent frame pointer. You can't get much
> more complicated than this and still use a single stack. -John]


None of the Pascal compilers I worked on used a display; instead they chased
the static chain if necessary to access a non-local.


--
Bill Findlay
with blueyonder.co.uk;
use surname & forename;
[Oh, right. That works, too, and is probably better if non-local references
are uncommon. -John]


Post a followup to this message

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