Re: procedures and environments (George Neuner)
5 Nov 1999 01:36:59 -0500

          From comp.compilers

Related articles
procedures and environments debray@CS.Arizona.EDU (1999-11-04)
Re: procedures and environments (1999-11-05)
Re: procedures and environments (Max Hailperin) (1999-11-05)
Re: procedures and environments (David L Moore) (1999-11-05)
Re: procedures and environments (1999-11-05)
Re: procedures and environments (1999-11-09)
Re: procedures and environments (1999-11-09)
| List of all articles for this month |

From: (George Neuner)
Newsgroups: comp.compilers
Date: 5 Nov 1999 01:36:59 -0500
Organization: Dynamic ReSolutions, Inc.
References: 99-11-028
Keywords: optimize, code

On 4 Nov 1999 00:36:11 -0500, debray@CS.Arizona.EDU (Saumya K. Debray)

> ..., a call would transfer control to the callee, which could either
> allocate an environment, or---if it chose to not allocate an
> environment for itself---execute in the caller's environment.

>(The need for this comes up in some code compression work we're doing,
>where we'd like to take identical code fragments and abstract them
>into procedures. The problem is that the procedures so created need
>to execute in their caller's environment. This feels like something
>someone must have looked at...)


As far as "language level" features, most Scheme implementations allow
construction of arbitrary environments as first class objects which
can be passed around as desired. I haven't seen the latest language
specs so I don't know if the features have been standardized - as of
R4RS they had not been.

Three questions:

- What language are you working in [or thinking in]?

- What are you referring to when you say "environment":
            lexical scope? instance values? name bindings?

- Why do you need to execute "in" the caller's environment"
rather than copy or share values with it?

George Neuner
Dynamic Resolutions, Inc.

Post a followup to this message

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