Commit [6b74d4] Maximize Restore History

Use load-time-assigned TLS indices for x86-64 opportunistically.

This change makes SYMBOL-VALUE understand that whenever the BIND vop
will have forced the fasloader to assign a TLS index to a symbol,
so that the index may be used as the 'disp' field of an EA, subsequent
references to the symbol should do likewise rather than load the index
to be used as the 'index' field of an EA.

This approach causes nondeterminism of compiled code but so localized
that it seems a worthwhile tradeoff with no semantic impact.
We could easily add a declaration to the effect that a symbol should
always be assumed to have been given an index by the loader, thus
removing the nondeterminism.

Also:
- thread slots manifesting as special variables will never
fallback to the symbol's global value.
- special variables in the COMMON-LISP package will always get
an index. There aren't enough of them to make this problematic
and it leads to nicer looking code for %WITH-REBOUND-IO-SYNTAX.

Douglas Katzman Douglas Katzman 2014-04-09

changed src/code/cross-type.lisp
changed src/compiler/x86-64/cell.lisp
changed src/compiler/x86-64/macros.lisp
changed src/compiler/globaldb.lisp
src/code/cross-type.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86-64/cell.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86-64/macros.lisp Diff Switch to side-by-side view
Loading...
src/compiler/globaldb.lisp Diff Switch to side-by-side view
Loading...