Function | Package: system | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## ensure-portable-walking-environment

Arguments: environment

This function returns an environment suitable for portable code walkers to use entirely within the ANSI Specification of Common Lisp.

Normally a `:compiler` environment will expand compiler-macros (though a `:compilation` environment will not do so, as per spec). The compiler does macroexpansions with a `:compiler` environment, so that the macroexpansion process can be a part of the compilation process, and so that compiler-savvy compiler-macros and macros can gain insights into the compiler's inner workings. Code walkers are themselves macros or compiler-macros at their top level (since it is only these two entities that can get access to environments), so these macros/compiler-macros must each make the decision as to whether they will handle a walk portably or non-portably. A non-portable walk will include possible compiler-macro expansions and stops at special forms (see the documentation for the Allegro CL implementation of macroexpand and macroexpand-1 in cl:macroexpand and cl:macroexpand in implementation.htm). But if the walker wants to operate portably, without expansion of compiler-macros and with macroexpansion of special forms, then this function must be called and the result used as the environment for the walk.

This function will always return an environment. If the environment argument is `nil`, then a new, empty `:interpreter` environment will be returned. If the environment argument is a `:compiler` environment, then it will be augmented once with no new information, and the result will be changed to a `:compilation` environment and returned. All other environment arguments wil be returned unchanged.

See environments.htm for more information on environments.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version