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

## *load-local-names-info*

This variable is similar to `*load-xref-info*` and `*load-source-file-info*` in that it controls whether information stored in a fasl file should be loaded into Lisp when the fasl file is loaded. The information is local name and scope information which is very useful for debugging.

That information is written to fasl files when the values of the optimization qualities safety, space, speed, and debug are such that either or both of the compiler switches `save-local-names-switch` and `save-local-scopes-switch` are true. See Declarations and optimizations in compiling.htm for information on switches.

When developing code, the value of this variable should be non-`nil` because the usefulness to debugging outweighs the cost of the additional space used. (See the :local top-level debugging command.) But when preparing an application for delivery which will not be interactively debugged, the value `nil` is appropriate.

This example shows how debugger output might differ when local names are and are not loaded. Suppose the function foo (with lots of locals) is defined in the file lln.cl:

    (in-package :user)

    (defun foo (a b c)
      (let ((c (* a a)) (d (+ c b)) e)
        (setq e (- c d))
        (break)
        (* e a d)))

We compile the file with speed 1 and safety 1 (so local names are saved to the fasl file) and then load the file with `*load-local-names-info*` set to `t` and then `nil`:

    cl-user(31): (setq *load-local-names-info* t)
    t
    cl-user(32): :ld lln.fasl
    ; Fast loading /user/lln.fasl
    cl-user(33): (foo 1 2 3)
    Break: call to the `break' function.

    Restart actions (select using :continue):
     0: return from break.
     1: Return to Top Level (an "abort" restart).
     2: Abort entirely from this (lisp) process.
    [1c] cl-user(34): :local
    Compiled lexical environment:
    0(required): a: 1
    1(required): b: 2
    2(required): c: 3
    3(local): d: 5
    4(local): c: 1
    5(local): e: -4
    [1c] cl-user(35): :cont 0
    -20
    cl-user(36): (setq *load-local-names-info* nil)
    nil
    cl-user(37): :ld lln.fasl
    ; Fast loading /user/lln.fasl
    cl-user(39): (foo 1 2 3)
    Break: call to the `break' function.

    Restart actions (select using :continue):
     0: return from break.
     1: Return to Top Level (an "abort" restart).
     2: Abort entirely from this (lisp) process.
    [1c] cl-user(40): :loc
    Compiled lexical environment:
    0(required): a: 1
    1(required): b: 2
    2(required): c: 3
    3(local): excl::local-0: 5
    4(local): excl::local-1: 1
    5(local): excl::local-2: -4
    6(local): excl::local-3: nil
    7(local): excl::local-4: 352323842
    8(local): excl::local-5: #<Function eval>
    9(local): excl::local-6: 16825334
    10(local): excl::local-7: 0
    [1c] cl-user(41):

The argument names and initial values are remembered in this example, but the local names (d and e) are not and c, an argument, is modified in the code, but the value (1) is no longer associated with c. Further, the system does not distinguish between variables in the function definition and others (dealing with the interpreter, for example) that happen to be around.

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