Major effort to plug slot-name leaks.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 14 Sep 2015 02:46:20 +0000 (03:46 +0100)
commit4b8e5c0347115ff30841f1d1e71afe59ecb6c82c
tree450964d3f93e8aefc05724185403096bef10a500
parenta535feed31204e82c6443411d16a03958c3ca4d2
Major effort to plug slot-name leaks.

Arrange that all slot names, for structures and CLOS objects, are
internal symbols of the relevant package.

There used to be a number of bad words in slot names, including `class',
`method', `expr', `type', and `condition'.  All of these have gone.

I've used two main approaches.

  * Renaming the slots with a leading `%'.  For structures, this
    involves hacking the constructor function to initialize the slot
    from a dummy argument with a less unpleasant name, and setting up
    trivial reader and writer function wrappers, so there's a new macro
    `define-access-wrapper' in utilities.lisp to do this.  For CLOS
    objects,  the accessor functions are named explicitly so that's not
    a problem, but there's a lot of work needed to track down direct
    slot accesses through `slot-value' and `with-slots'.

  * For classes defined through `definst', I've instead named the slots
    with gensyms (at read time), because their names are used as part of
    automagically defined methods.

I may not have fixed everything: this is a rather invasive change.
24 files changed:
doc/list-exports.lisp
src/c-types-class-impl.lisp
src/c-types-proto.lisp
src/class-finalize-impl.lisp
src/class-layout-impl.lisp
src/class-layout-proto.lisp
src/class-make-impl.lisp
src/class-output.lisp
src/classes.lisp
src/codegen-impl.lisp
src/codegen-proto.lisp
src/method-impl.lisp
src/method-proto.lisp
src/module-proto.lisp
src/parser/floc-proto.lisp
src/parser/parser-expr-impl.lisp
src/parser/parser-expr-proto.lisp
src/parser/parser-impl.lisp
src/parser/scanner-charbuf-impl.lisp
src/parser/scanner-impl.lisp
src/parser/scanner-proto.lisp
src/parser/scanner-token-impl.lisp
src/pset-proto.lisp
src/utilities.lisp