[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packages & Compiling



    Date: Monday, 12 January 1987  19:15-EST
    From: Timothy.Freeman at theory.cs.cmu.edu
    Re:   Packages & Compiling

    ... Allowing the compiler
    to depend upon the package environment when it is compiling a
    not-in-line function call doesn't allow it to produce better code.

True; it simply allows the compiler to function.  The basic problem is
that if you use READ to read, there is no way to intern the symbol the
same way at load time, since the reader threw away the information
about how the symbol was read.

For example, if the source file contains the symbol reference FOO::X,
but X's home package is actually BAR, then the compiler will dump code
which does the equivalent of reading BAR::X at load time.  The result
will be the X currently accessible in the BAR package, regardless
of what symbol is currently accessible in the FOO package.

In contrast, if FOO::X was read again by loading the source, then the
symbol would be read as whatever X is accessible in the FOO package.

  Rob