chiark / gitweb /
sod
8 years agodoc/sod.tex: Spruce up the index handling.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/sod.tex: Spruce up the index handling.

  * Use `idxlayout' to format the index entries better.

  * Use the `makeidx' package's `\printindex' to read the index file.

8 years agoSTYLE: Zap trailing whitespace.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
STYLE: Zap trailing whitespace.

8 years agosrc/module-output.lisp, test/chimaera.sod: Add output items for user code.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/module-output.lisp, test/chimaera.sod: Add output items for user code.

It seems likely that many modules will want to add plain C code to the
implementation output, and declarations to the header, so provide
standard output items `early_user' and `user' for this purpose.

8 years agosrc/sod-{frontend,test}.asd.in: Define systems in separate packages.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/sod-{frontend,test}.asd.in: Define systems in separate packages.

Now that the system-definition packages have started exporting
variables, we'll get annoying warnings if the different `defpackage'
forms have inconsistent exports.

8 years agosrc/output-{proto,impl}.lisp: `sequencer''s :constraints initarg takes names.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/output-{proto,impl}.lisp: `sequencer''s :constraints initarg takes names.

The `constraints' slot of a `sequencer' object maintains a list of
constraints, each of which is a list of `sequencer-item' objects, and
this list is ordered with the most-recently added constraint first.

Previously the :constraints initarg just set this list directly, which
isn't really very satisfactory.  Instead, handle the initarg specially,
reversing it, and converting item names into the actual items, interning
them properly.

This isn't completely right, because there's no way at this time to
attach handler functions to the implicitly created items, but it's way
better than nothing.

8 years agosrc/class-output.lisp: Reformat and reorder.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/class-output.lisp: Reformat and reorder.

The major improvement is to gather together the methods which walk the
layout hierarchy, independently of the output reason.

8 years agosrc/utilities.lisp (merge-lists): Make default tie-break sane, and document.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/utilities.lisp (merge-lists): Make default tie-break sane, and document.

  * Make sure the candidate list given to the tie-breaking `pick'
    function is sorted according to the /first/ list each candidate
    appears in, rather than the last one, because `remove-duplicates' by
    default keeps the last-appearing element of each equivalence class,
    unless I give `:from-end t'.  So do that.

  * Describe the tie-breaking behaviour now that it's sane.  This is
    sort of important because it's used by the output machinery.

8 years agosrc/utilities.lisp: Use `do' in place of unnecessary `do*'.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/utilities.lisp: Use `do' in place of unnecessary `do*'.

The other loop variables seem to have gotten lost somewhere along the
way.

8 years agosrc/utilities.lisp: Fix another docstring's formatting.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/utilities.lisp: Fix another docstring's formatting.

8 years agodoc/: Initial work on an index.
Mark Wooding [Thu, 1 Oct 2015 10:49:58 +0000 (11:49 +0100)]
doc/: Initial work on an index.

8 years agoSTYLE: Document Lisp programming style.
Mark Wooding [Thu, 1 Oct 2015 10:49:41 +0000 (11:49 +0100)]
STYLE: Document Lisp programming style.

8 years agosrc/Makefile.am: Reinstate ASDF output translations.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/Makefile.am: Reinstate ASDF output translations.

These were mistakenly removed during the version number
hacking (58a9509...).  It's important to separate the good command-line
build from builds done inside a resident Lisp for hacking, because the
latter might be full of debug pessimizations.

8 years agodoc/SYMBOLS, doc/list-exports.lisp: Nail down output order properly.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/SYMBOLS, doc/list-exports.lisp: Nail down output order properly.

8 years agodoc/: More Lisp synopses.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/: More Lisp synopses.

These might be done now, in fact.

8 years agodoc/sod.sty: More describe categories.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/sod.sty: More describe categories.

8 years agosrc/class-output.lisp: Use `vtable-name' rather than doing it by hand.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/class-output.lisp: Use `vtable-name' rather than doing it by hand.

8 years agosrc/sod-{frontend,test}.asd.in: Export `*version*'.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/sod-{frontend,test}.asd.in: Export `*version*'.

Have the other sysdef files also export this symbol because otherwise
SBCL emits annoying warnings.

8 years agosrc/module-impl.lisp: Don't require `finalize-module' to return the module.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/module-impl.lisp: Don't require `finalize-module' to return the module.

Returning the correct module object is now the responsibility of
`build-module'.

8 years agosrc/module-impl.lisp: Eliminate `define-fragment'.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/module-impl.lisp: Eliminate `define-fragment'.

It had a severely deficient interface: it could only define fragments
with constant contents.  Moreover, although it made an effort to accept
a string-literal as its text, it ended up in a tangle because
`code-fragment-item' insists on its `fragment' slot actually containing
a code fragment, and nothing does the conversion.

Rather than fix these bugs, I noticed that nothing actually used it at
all, so removing it completely seemed like a better option.

8 years agosrc/: Yet more naming and export twiddles.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/: Yet more naming and export twiddles.

  * Export `class-item', which names a pluggable parser invoked in
    parsing class definitions.

  * Export the accessors for `code-fragment-item' objects.

  * Rename the `message-*' generic methods to be `sod-message-*', for
    consistency with the existing accessors.  Specific targets are
    `message-combination', on aggregating messages, and
    `message-effective-method-class', part of the layout protocol, which
    is just inconsistent with `sod-message-method-class' in the
    metaobject construction protocol.

  * Also export `sod-message-kernel-function', which is used in
    aggregating messages.

  * Astonishingly, I'd not exported any of the `vtmsgs' symbols.

8 years agodoc/Makefile.am: `output.tex' exists, so depend on it.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/Makefile.am: `output.tex' exists, so depend on it.

Also spell its name properly, which explains why it didn't work before
and was mistakenly commented out.

8 years agodoc/SYMBOLS: More changes.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/SYMBOLS: More changes.

8 years agodoc/: More synopses.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
doc/: More synopses.

8 years agodoc/misc.tex: Kill stray \relax.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/misc.tex: Kill stray \relax.

8 years agodoc/parsing.tex: Document `parsing' macro.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/parsing.tex: Document `parsing' macro.

8 years agodoc/: Document where declarations are permitted in macros.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/: Document where declarations are permitted in macros.

8 years agodoc/sod.sty: Fix describe category position when indented.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Fix describe category position when indented.

8 years agosrc/classes.lisp, src/class-finalize-impl.lisp: Don't export slot writers.
Mark Wooding [Tue, 22 Sep 2015 10:27:11 +0000 (11:27 +0100)]
src/classes.lisp, src/class-finalize-impl.lisp: Don't export slot writers.

Make accessors to finalization-time slots be plain readers, and use
`slot-value' explicitly to set them at the right time.

8 years agosrc/: Improve handling of declarations in macros.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Improve handling of declarations in macros.

Teach `parse-body' to be able to parse only declarations or only
documentation.  Use this in macros with convoluted internal binding
structure.

8 years agosrc/: More exports, found while documenting things.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: More exports, found while documenting things.

8 years agodebian/rules: Don't strip the main executable.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
debian/rules: Don't strip the main executable.

It doesn't work.  All the good stuff in the dumped image gets stripped
out and you're left with a bare SBCL which probably doesn't even work.

8 years agoAdd build machinery for the manual.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Add build machinery for the manual.

8 years agoMerge branch 'master' into doc
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Merge branch 'master' into doc

* master:
  src/parser/parser-expr-impl.lisp: Compare paren tags with `eql'.
  src/module-impl.lisp: Expose `c-fragment' state.
  src/lexer-proto.lisp: Export some more symbols.
  src/pset-proto.lisp (default-slot-from-property): Make `slot-names' optional.
  src/pset-proto.lisp: Fix export of `check-unused-properties'.
  src/: Fix some docstrings.

8 years agosrc/parser/parser-expr-impl.lisp: Compare paren tags with `eql'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/parser-expr-impl.lisp: Compare paren tags with `eql'.

They're often characters, which can't reliably be compared with `eq'.
Not sure what I was thinking, really.

8 years agosrc/module-impl.lisp: Expose `c-fragment' state.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/module-impl.lisp: Expose `c-fragment' state.

  * Export `c-fragment-text', and use `file-location' to read the
    location.

  * But make these be read-only.

8 years agosrc/lexer-proto.lisp: Export some more symbols.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/lexer-proto.lisp: Export some more symbols.

8 years agosrc/pset-proto.lisp (default-slot-from-property): Make `slot-names' optional.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/pset-proto.lisp (default-slot-from-property): Make `slot-names' optional.

To match `default-slot'.

8 years agosrc/pset-proto.lisp: Fix export of `check-unused-properties'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/pset-proto.lisp: Fix export of `check-unused-properties'.

8 years agosrc/: Fix some docstrings.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Fix some docstrings.

8 years agodoc/SYMBOLS: More fixes to file exports.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/SYMBOLS: More fixes to file exports.

8 years agodoc/: Add more synopses.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/: Add more synopses.

8 years agodoc/list-exports.lisp: Collect symbols from frontend.lisp.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Collect symbols from frontend.lisp.

8 years agodoc/misc.tex: Track movement of locatives.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/misc.tex: Track movement of locatives.

8 years agoMerge branch 'master' into doc
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Merge branch 'master' into doc

* master:
  src/utilities.lisp, src/optparse.lisp: Move locatives to `utilities'.
  src/c-types-proto.lisp: Fix docstring.
  src/parser/parser-proto.lisp: Export `combine-parser-failures'.
  src/utilities.lisp: Move `define-on-demand-slot' to the right section.
  src/codegen-impl.lisp: Rename some `inst' slots.
  src/codegen-{proto,impl}.lisp: Make *temporary-index* be a module var.
  src/class-make-proto.lisp: Choose Lisp metaclass more cleverly.
  src/class-make-impl.lisp: Abstract out the guts of `guess-metaclass'.
  src/c-types-impl.lisp: Fix arg list in `c-function-type' instance init.
  src/lexer-bits.lisp: Delete crufty old file.

8 years agodoc/SYMBOLS: Actually check this in, so we can see how it changes.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/SYMBOLS: Actually check this in, so we can see how it changes.

So stop ignoring it.

8 years agodoc/list-exports.lisp: Also scan `optparse.lisp'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Also scan `optparse.lisp'.

8 years agosrc/utilities.lisp, src/optparse.lisp: Move locatives to `utilities'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/utilities.lisp, src/optparse.lisp: Move locatives to `utilities'.

8 years agosrc/c-types-proto.lisp: Fix docstring.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-proto.lisp: Fix docstring.

8 years agosrc/parser/parser-proto.lisp: Export `combine-parser-failures'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/parser-proto.lisp: Export `combine-parser-failures'.

8 years agosrc/utilities.lisp: Move `define-on-demand-slot' to the right section.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/utilities.lisp: Move `define-on-demand-slot' to the right section.

8 years agosrc/codegen-impl.lisp: Rename some `inst' slots.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/codegen-impl.lisp: Rename some `inst' slots.

Mostly to make them shorter.

8 years agosrc/codegen-{proto,impl}.lisp: Make *temporary-index* be a module var.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/codegen-{proto,impl}.lisp: Make *temporary-index* be a module var.

This arranges for it to be reset properly.

Also, move it into `impl', because users shouldn't mess with it.

8 years agosrc/class-make-proto.lisp: Choose Lisp metaclass more cleverly.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-make-proto.lisp: Choose Lisp metaclass more cleverly.

Use the same algorithm as is used to choose the runtime metaclass:
if a property names a class explicitly then use that; otherwise, choose
the most specific metaclass of any of the direct superclasses.  If there
are no proper superclasses then default to `sod-class' because that's
what `builtin' needs.

8 years agosrc/class-make-impl.lisp: Abstract out the guts of `guess-metaclass'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-make-impl.lisp: Abstract out the guts of `guess-metaclass'.

It's mostly trying to pick out a maximum value from a partially ordered
set.  This is a useful primitive, so factor it out.

This also exposes a hack in the previous `guess-metaclass'
implementation.  It would, somewhat sneakily, manage to return nil if
given an empty superclass list, which is ideal for the builtin module,
which hasn't built the metaclass yet and must fill it in later.  Leave
this hack in, but make it more explicit.

8 years agosrc/c-types-impl.lisp: Fix arg list in `c-function-type' instance init.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-impl.lisp: Fix arg list in `c-function-type' instance init.

Previously, `make-function-type' was responsible for spotting `(void)'
argument lists and converting them into empty lists, so if you used
`make-instance' directly you could sneak an actual `(void)' argument
list int.  Now the instance initialization machinery for the
`c-function-type' class does this itself, so the gap is closed.

8 years agosrc/lexer-bits.lisp: Delete crufty old file.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/lexer-bits.lisp: Delete crufty old file.

8 years agodoc/: Actually write documentation.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/: Actually write documentation.

Mostly this is importing synopses which need to have stuff written
about them and around them.  But it's all progress, right?

8 years agodoc/structures.tex: Present the concrete structures in `describe'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/structures.tex: Present the concrete structures in `describe'.

8 years agodoc/syntax.tex: Put the `arbitrary code execution' warning in a box.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/syntax.tex: Put the `arbitrary code execution' warning in a box.

8 years agodoc/sod.sty: Fiddle with the `describe' categories.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Fiddle with the `describe' categories.

Include a bunch of new ones and change the display names of a few
existing ones.

8 years agodoc/sod.sty: Overhaul `describe' environment.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Overhaul `describe' environment.

  * Split out the machinery which parses and sets the heading to make a
    new environment `describe*' which can have multiple headings.

  * Remove the `tabular' layer in the headings, by using `\rlap'
    instead.

  * Fix spacing around the header lines.

  * Insert penalties and drive the `\if@nobreak' and `\@afterheading'
    machinery correctly so that we mostly don't get bad page breaks.

8 years agodoc/sod.sty: Fix footer comment.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Fix footer comment.

8 years agodoc/sod.sty: Make `boxy' environment handle footnotes properly.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Make `boxy' environment handle footnotes properly.

8 years agodoc/sod.sty: Add macro for table column heads.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.sty: Add macro for table column heads.

Somewhat unpleasant.

8 years agodoc/sod.tex: Rearrange some of the file-to-chapter assignments.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.tex: Rearrange some of the file-to-chapter assignments.

8 years agodoc/sod.tex: Front matter begins at the beginning.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.tex: Front matter begins at the beginning.

8 years agodoc/sod.tex: Print a proper title page.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/sod.tex: Print a proper title page.

8 years agodoc/runtime.tex: Decide that C `describe' synopses include a trailing `;'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/runtime.tex: Decide that C `describe' synopses include a trailing `;'.

8 years agodoc/clang.tex: Fix labels and references.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/clang.tex: Fix labels and references.

8 years agodoc/{runtime,structures}.tex: Mostly translated from the manpages.
Mark Wooding [Thu, 17 Sep 2015 17:25:16 +0000 (18:25 +0100)]
doc/{runtime,structures}.tex: Mostly translated from the manpages.

8 years agoMerge branch 'master' into doc
Mark Wooding [Thu, 17 Sep 2015 17:24:55 +0000 (18:24 +0100)]
Merge branch 'master' into doc

* master:
  lib/sod-structs.3: Some clarifications and typesetting fixes.
  src/parser/scanner-charbuf.impl (charbuf-scanner-map): Return CONSUMEDP.
  src/parser/scanner-charbuf-impl.lisp: Simplify `stream-read-line'.
  src/parser/scanner-charbuf-impl.lisp: Use `replace' rather than a loop.
  src/parser/scanner-impl.lisp: More exports for `list-scanner'.
  src/parser/scanner-impl.lisp: Make streams from string scanners.
  final.lisp: Move definition of *sod-version* here.
  src/frontend.lisp: Use gensyms to name symbols consistently.

8 years agolib/sod-structs.3: Some clarifications and typesetting fixes.
Mark Wooding [Thu, 17 Sep 2015 17:24:26 +0000 (18:24 +0100)]
lib/sod-structs.3: Some clarifications and typesetting fixes.

8 years agodoc/sod.tex: Describe the data structures after the runtime library.
Mark Wooding [Thu, 17 Sep 2015 17:23:43 +0000 (18:23 +0100)]
doc/sod.tex: Describe the data structures after the runtime library.

This goes against my usual grain, but in this case I don't think it
works the other way round because the types are so complicated.

8 years agodoc/sod.sty: Make `@->' typeset a dereferencing arrow.
Mark Wooding [Thu, 17 Sep 2015 17:22:24 +0000 (18:22 +0100)]
doc/sod.sty: Make `@->' typeset a dereferencing arrow.

8 years agodoc/sod.sty: Hack underscores in the labels generated by `describe'.
Mark Wooding [Thu, 17 Sep 2015 17:21:05 +0000 (18:21 +0100)]
doc/sod.sty: Hack underscores in the labels generated by `describe'.

Turn them into `-' because otherwise everything goes wrong.

8 years agoKill uninteresting TeX debris.
Mark Wooding [Thu, 17 Sep 2015 17:20:17 +0000 (18:20 +0100)]
Kill uninteresting TeX debris.

8 years agosrc/parser/scanner-charbuf.impl (charbuf-scanner-map): Return CONSUMEDP.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/scanner-charbuf.impl (charbuf-scanner-map): Return CONSUMEDP.

The docstring says that the function implements the parser protocol, but
it misses an important part of it out.  Fix this omission.

8 years agosrc/parser/scanner-charbuf-impl.lisp: Simplify `stream-read-line'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/scanner-charbuf-impl.lisp: Simplify `stream-read-line'.

We do more or less the same stuff at the end regardless of how we got
there, so factor it out.

8 years agosrc/parser/scanner-charbuf-impl.lisp: Use `replace' rather than a loop.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/scanner-charbuf-impl.lisp: Use `replace' rather than a loop.

Somehow I failed to notice `replace' being a completely cromulent
`memcpy' thing for Lisp.

8 years agosrc/parser/scanner-impl.lisp: More exports for `list-scanner'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/scanner-impl.lisp: More exports for `list-scanner'.

8 years agosrc/parser/scanner-impl.lisp: Make streams from string scanners.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/scanner-impl.lisp: Make streams from string scanners.

Implement `make-scanner-stream' for `string-scanner'.

8 years agofinal.lisp: Move definition of *sod-version* here.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
final.lisp: Move definition of *sod-version* here.

Seems more at home somehow.

8 years agosrc/frontend.lisp: Use gensyms to name symbols consistently.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/frontend.lisp: Use gensyms to name symbols consistently.

8 years agodoc/: Sort out the manual structure. Write stuff.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/: Sort out the manual structure.  Write stuff.

Don't expect great commit messages for a while.

8 years agoMerge branch 'master' into doc
Mark Wooding [Mon, 14 Sep 2015 21:34:48 +0000 (22:34 +0100)]
Merge branch 'master' into doc

* master: (93 commits)
  Eliminate the separately maintained Lisp system version number.
  src/{builtin,final,frontent}.lisp: `clear-the-decks' makes builtin module.
  src/class-{finalize,layout}-impl.lisp: Error checking on layout slots.
  src/class-finalize-impl.lisp: Remove FIXME which was fixed ages ago.
  src/: Introduce a macro for defining on-demand slots.
  Major effort to plug slot-name leaks.
  doc/list-exports.lisp: Report on generic function methods.
  doc/list-exports.lisp: Strip duplicate exports.
  doc/list-exports.lisp: Better pretty formatting for keywords.
  doc/list-exports.lisp: Mark the start of the class tree dump.
  src/codegen-proto.lisp, doc/list-exports.lisp: Export `inst' readers.
  src/: More missing exports.
  doc/list-exports.lisp: Sort sibling classes by name in the tree.
  doc/list-exports.lisp: Search for exports inside `eval-when' blocks.
  doc/list-exports.lisp: Don't get confused and thing `nil' isn't interned.
  doc/list-exports.lisp: Check for anomalies when preparing reports.
  doc/list-exports.lisp: Some sketchy code to report on exported symbols.
  src/: Fix up some wrong exports.
  src/final.lisp, src/frontend.lisp: Compile methods before dumping.
  src/frontend.lisp: Prepare the builtin module at load time.
  ...

8 years agoEliminate the separately maintained Lisp system version number.
Mark Wooding [Mon, 14 Sep 2015 17:10:06 +0000 (18:10 +0100)]
Eliminate the separately maintained Lisp system version number.

  * Have `configure.ac' derive a version string which ASDF won't choke
    on and make that available as an output variable.

  * Move the ASD files to `.in' files, and substitute the source path
    into them at build time, so that they actually still work.

  * At build time, construct an `auto.lisp' file with the relevant version
    information; modify the ASD `.in' files to load this.

  * At install time, construct the ASD files differently, by stripping
    out the source path and substituting the version information bodily
    into the files.

  * Actually install the `sod-frontend' system definition, just in case
    it's useful to someone.

  * Actually remove the ASDF symlinks when we're finished.

8 years agosrc/{builtin,final,frontent}.lisp: `clear-the-decks' makes builtin module.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/{builtin,final,frontent}.lisp: `clear-the-decks' makes builtin module.

Add a `clear-the-decks' function which will make the builtin module if
it's not been set up yet.  Now we don't need to do this explicitly and
everything is better.

8 years agosrc/class-{finalize,layout}-impl.lisp: Error checking on layout slots.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-{finalize,layout}-impl.lisp: Error checking on layout slots.

The layout slots which are autovivifying (`effective-methods',
`%ilayout', and `vtables') shouldn't be accessed prior to class
finalization, so gather their definitions together and check that this
is done properly.

8 years agosrc/class-finalize-impl.lisp: Remove FIXME which was fixed ages ago.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-finalize-impl.lisp: Remove FIXME which was fixed ages ago.

The slots which were marked for autovivifying in fact have been for five
years.  We can delete setting them explicitly without great loss.

8 years agosrc/: Introduce a macro for defining on-demand slots.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Introduce a macro for defining on-demand slots.

This is a surprisingly major win.

8 years agoMajor effort to plug slot-name leaks.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
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.

8 years agodoc/list-exports.lisp: Report on generic function methods.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Report on generic function methods.

Show all methods on newly defined generic functions, and all methods
specialized on our own classes.

8 years agodoc/list-exports.lisp: Strip duplicate exports.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Strip duplicate exports.

They can happen legitimately because of automatic exporting.

8 years agodoc/list-exports.lisp: Better pretty formatting for keywords.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Better pretty formatting for keywords.

8 years agodoc/list-exports.lisp: Mark the start of the class tree dump.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Mark the start of the class tree dump.

8 years agosrc/codegen-proto.lisp, doc/list-exports.lisp: Export `inst' readers.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/codegen-proto.lisp, doc/list-exports.lisp: Export `inst' readers.

8 years agosrc/: More missing exports.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: More missing exports.

8 years agodoc/list-exports.lisp: Sort sibling classes by name in the tree.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Sort sibling classes by name in the tree.

8 years agodoc/list-exports.lisp: Search for exports inside `eval-when' blocks.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Search for exports inside `eval-when' blocks.

8 years agodoc/list-exports.lisp: Don't get confused and thing `nil' isn't interned.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Don't get confused and thing `nil' isn't interned.

Check the correct value of `find-symbol', because `nil' is false.