Related articles |
---|
procedures and environments debray@CS.Arizona.EDU (1999-11-04) |
Re: procedures and environments rweaver@ix.netcom.com (1999-11-05) |
Re: procedures and environments max@gac.edu (Max Hailperin) (1999-11-05) |
Re: procedures and environments dlmoore@pgroup.com (David L Moore) (1999-11-05) |
Re: procedures and environments gneuner@dyn.com (1999-11-05) |
Re: procedures and environments plakal@nospam-cs.wisc.edu (1999-11-09) |
Re: procedures and environments andi@complang.tuwien.ac.at (1999-11-09) |
From: | gneuner@dyn.com (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)
wrote:
> ..., 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...)
Macro?
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.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.