VariablePackage: compilerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

trust-dynamic-extent-declarations-switch

As with all compiler switch variables, the value of this variable can be t, nil, or a function object that accepts five arguments and returns t or nil. The arguments passed to the function will be the values of the safety, space, speed, debug, and compilation-speed optimization qualities, in that order. nil is equivalent to a function that always returns nil and t to a function that always returns t. When the value is a function and we say t (or true) or nil (or false) in the text below, we mean that the function returns, respectively, t or nil.

If true, and if the compiler trusts declarations (that is trust-declarations-switch is true), the compiler will trust dynamic-extent declarations in code and produce code (when it can) that is optimized given the declarations. One optimization that is possible when objects are declared dynamic-extent (and the declaration is trusted) is stack allocation (where the object is stored on the stack and not in memory, see Stack consing, avoiding consing using apply, and stack allocation in compiling.htm).

Having a switch which controls dynamic-extent declarations when declarations are trusted (via the general trust-declarations-switch) allows dynamic-extent declarations to be ignored while other declarations are trusted. When using multiprocessing, trusting dynamic-extent declarations may be unsafe when trusting other declarations is safe. See Stack consing, avoiding consing using apply, and stack allocation in compiling.htm for a discussion of the issues surrounding multiprocessing and dynamic extent.

If trust-declarations-switch is nil, this switch is ignored.

Initially true when speed is greater than or equal to safety, which means that this switch will be true in the default when the trust-declarations-switch is true in the default (which is when speed is greater than safety). If there is an issue with multiprocessing, you should bind or set this switch to nil, or design your own function.

See compiling.htm for information on the compiler.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version