FunctionPackage: systemToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.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-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version