sod
4 years agodoc/meta.tex: Delete stubs for obsolete `define-sod-class' local-macros.
Mark Wooding [Wed, 7 Aug 2019 16:55:36 +0000 (17:55 +0100)]
doc/meta.tex: Delete stubs for obsolete `define-sod-class' local-macros.

4 years agodoc/misc.tex: Clarify that `augment-options' is in `sod-frontend'.
Mark Wooding [Wed, 7 Aug 2019 16:51:20 +0000 (17:51 +0100)]
doc/misc.tex: Clarify that `augment-options' is in `sod-frontend'.

4 years agodoc/parsing.tex: Reorganize the parsing-syntax section.
Mark Wooding [Wed, 7 Aug 2019 16:36:08 +0000 (17:36 +0100)]
doc/parsing.tex: Reorganize the parsing-syntax section.

Add some substructure and labels.  Promote `with-parser-context' to
first position.

I'm not sure this is completely right, but the previous situation was a
total mess.

4 years agodoc/clang.tex: Clarify that `c-function-arguments' never gives you keywords.
Mark Wooding [Wed, 7 Aug 2019 16:32:58 +0000 (17:32 +0100)]
doc/clang.tex: Clarify that `c-function-arguments' never gives you keywords.

4 years agodoc/*.tex: Minor source-level reformatting.
Mark Wooding [Wed, 7 Aug 2019 16:16:06 +0000 (17:16 +0100)]
doc/*.tex: Minor source-level reformatting.

No effect on the document.

4 years agodoc/sod.sty: Provide explicit description labelling and indexing commands.
Mark Wooding [Wed, 7 Aug 2019 15:26:34 +0000 (16:26 +0100)]
doc/sod.sty: Provide explicit description labelling and indexing commands.

And a `\dhead*' which suppresses the usual labelling and indexing, for
the sake of special effects.  Use this new machinery to inhibit
the (possibly confusing) indexing on the example entries in
`lispintro.tex'.

4 years agodoc/sod.sty: Rewrite `\descref' to support a [MOD] argument.
Mark Wooding [Wed, 7 Aug 2019 15:24:33 +0000 (16:24 +0100)]
doc/sod.sty: Rewrite `\descref' to support a [MOD] argument.

Take the opportunity to factor out an annoying part of the parsing,
which `might' come in handy later.

4 years agodoc/sod.sty: Make the `modindex' and `modlabel' argument order less mad.
Mark Wooding [Wed, 7 Aug 2019 15:15:31 +0000 (16:15 +0100)]
doc/sod.sty: Make the `modindex' and `modlabel' argument order less mad.

Now it's {MOD}{CAT}{...}...{NAME}, like (nearly) everything else.

4 years agodoc/sod.sty: Keep `muffs' and `kwd' names decorated.
Mark Wooding [Wed, 7 Aug 2019 15:10:14 +0000 (16:10 +0100)]
doc/sod.sty: Keep `muffs' and `kwd' names decorated.

Have the `modindex' method strip off the decorations instead.

4 years agodoc/sod.sty: Rename the default modifier to `plain'.
Mark Wooding [Wed, 7 Aug 2019 14:28:38 +0000 (15:28 +0100)]
doc/sod.sty: Rename the default modifier to `plain'.

4 years agodoc/sod.sty: Make `\fmtspecs' be external again.
Mark Wooding [Wed, 7 Aug 2019 14:24:46 +0000 (15:24 +0100)]
doc/sod.sty: Make `\fmtspecs' be external again.

Sadly, putting `\@...' control sequences in the index doesn't work.

4 years agodoc/clang.tex, doc/layout.tex: Add labels and indexing for things in tables.
Mark Wooding [Wed, 7 Aug 2019 16:26:42 +0000 (17:26 +0100)]
doc/clang.tex, doc/layout.tex: Add labels and indexing for things in tables.

The simple C types, instruction types, and temporary names lacked
description entries.  Use the new `\desclabel' to arrange index entries
and labels.

4 years agosrc/codegen-impl.lisp: Remove the `setf' writer for `codegen-functions'.
Mark Wooding [Wed, 7 Aug 2019 16:22:16 +0000 (17:22 +0100)]
src/codegen-impl.lisp: Remove the `setf' writer for `codegen-functions'.

It's not used for anything, and I don't think I want to export it.

4 years agosrc/parser/streams-impl.lisp: Use slot accessor rather than `with-slots'.
Mark Wooding [Wed, 7 Aug 2019 16:21:40 +0000 (17:21 +0100)]
src/parser/streams-impl.lisp: Use slot accessor rather than `with-slots'.

The code is a bit longer, but I think it's more comfortable to read.

4 years agosrc/method-proto.lisp: Use new `definst' private-slot-name feature.
Mark Wooding [Wed, 7 Aug 2019 16:20:55 +0000 (17:20 +0100)]
src/method-proto.lisp: Use new `definst' private-slot-name feature.

I missed this when I was fixing up the codegen code.

4 years agosrc/codegen-proto.lisp: Delete obsolete `HACK' warning.
Mark Wooding [Wed, 7 Aug 2019 16:20:14 +0000 (17:20 +0100)]
src/codegen-proto.lisp: Delete obsolete `HACK' warning.

There's a principled(-ish) feature in `definst' nowadays.

4 years agosrc/*.lisp: Add missing exports.
Mark Wooding [Wed, 7 Aug 2019 16:17:55 +0000 (17:17 +0100)]
src/*.lisp: Add missing exports.

All of these have documentation stubs (at least), but for some reason
didn't get exported.  In most cases, it's because they're slot accessors
for a class, rather than the headline name, but there are a few
exceptions.

4 years agodoc/SYMBOLS: Distinguish c-type and parser (atomic) specifiers and forms.
Mark Wooding [Wed, 7 Aug 2019 13:25:50 +0000 (14:25 +0100)]
doc/SYMBOLS: Distinguish c-type and parser (atomic) specifiers and forms.

4 years agodoc/list-exports: Executables shouldn't have language-specific names.
Mark Wooding [Tue, 6 Aug 2019 12:07:01 +0000 (13:07 +0100)]
doc/list-exports: Executables shouldn't have language-specific names.

Why did I tolerate this for so long?

4 years agodoc/list-exports.lisp: Document and lightly reformat.
Mark Wooding [Tue, 6 Aug 2019 12:06:06 +0000 (13:06 +0100)]
doc/list-exports.lisp: Document and lightly reformat.

Much more pleasant.

4 years agodoc/list-exports.lisp: Forbid bad slot names in private classes.
Mark Wooding [Tue, 6 Aug 2019 12:02:38 +0000 (13:02 +0100)]
doc/list-exports.lisp: Forbid bad slot names in private classes.

Previously we only worried about exported/foreign slot names in classes
whose names were exported symbols.  Also worry about classes whose names
are private symbols (in the home package).

4 years agodoc/list-exports.lisp (pretty-symbol-name): Don't hide strange symbol names.
Mark Wooding [Tue, 6 Aug 2019 11:59:29 +0000 (12:59 +0100)]
doc/list-exports.lisp (pretty-symbol-name): Don't hide strange symbol names.

The old code just squashed the symbol name to lowercase and printed it.
This hides symbol names which already have lowercase letters in them, or
funny characters like colons.

We don't actually have any such names.

4 years agodoc/list-exports.lisp (best-package-name: Don't sort the whole list.
Mark Wooding [Tue, 6 Aug 2019 11:58:23 +0000 (12:58 +0100)]
doc/list-exports.lisp (best-package-name: Don't sort the whole list.

Just pick the shortest one.

4 years agosrc/c-types-parse.lisp: Rename slots with public names.
Mark Wooding [Tue, 6 Aug 2019 12:04:45 +0000 (13:04 +0100)]
src/c-types-parse.lisp: Rename slots with public names.

Oops.  Hadn't noticed these before because `list-exports' wasn't clever
enough.

4 years agosrc/codegen-proto.lisp (definst): Name the argnames `public' and `private'.
Mark Wooding [Tue, 6 Aug 2019 11:56:59 +0000 (12:56 +0100)]
src/codegen-proto.lisp (definst): Name the argnames `public' and `private'.

The `cooked' name was no more cooked than the `raw' one, so that was a
daft convention.

4 years agodoc/list-exports.lisp: Categorize `setf'-functions as generic or plain.
Mark Wooding [Tue, 6 Aug 2019 00:51:24 +0000 (01:51 +0100)]
doc/list-exports.lisp: Categorize `setf'-functions as generic or plain.

4 years agosod/doc.sty: Reorganize and improve documentation.
Mark Wooding [Mon, 5 Aug 2019 17:15:06 +0000 (18:15 +0100)]
sod/doc.sty: Reorganize and improve documentation.

It's almost pleasant to work with now.

4 years agodoc/sod.sty, etc.: Remove `type' category code.
Mark Wooding [Mon, 5 Aug 2019 17:15:43 +0000 (18:15 +0100)]
doc/sod.sty, etc.: Remove `type' category code.

It was a synonym for `ty', which I prefer, only you have to pick the
right one to get cross-references to work, which sucks.

4 years agodoc/sod.sty: Unpublish `\fmtspecs'.
Mark Wooding [Mon, 5 Aug 2019 17:11:27 +0000 (18:11 +0100)]
doc/sod.sty: Unpublish `\fmtspecs'.

4 years agodoc/sod.sty: Get `\@scripts' to cope if `_' isn't active.
Mark Wooding [Mon, 5 Aug 2019 17:09:41 +0000 (18:09 +0100)]
doc/sod.sty: Get `\@scripts' to cope if `_' isn't active.

4 years agodoc/sod.sty: Debug `@;'.
Mark Wooding [Mon, 5 Aug 2019 17:08:08 +0000 (18:08 +0100)]
doc/sod.sty: Debug `@;'.

OMG.

  * Don't eat the `\\' and then hope to find it.

  * Actually chew through the `;' characters rather than piling them up.

  * Don't eat spaces while looking for more `;'s.

4 years agodoc/sod.sty: Get `@--...' to typeset a sequence of dashes properly.
Mark Wooding [Mon, 5 Aug 2019 17:06:45 +0000 (18:06 +0100)]
doc/sod.sty: Get `@--...' to typeset a sequence of dashes properly.

Now we can replace the explicit `--\,--' bodge.

4 years agodoc/sod.sty: Rewrite `@-' to cope with other things following.
Mark Wooding [Mon, 5 Aug 2019 17:06:07 +0000 (18:06 +0100)]
doc/sod.sty: Rewrite `@-' to cope with other things following.

Also, typesets as a dash, which is probably good.

4 years agodoc/sod.sty: Hoist `\@ifnextchar@preserve' further up.
Mark Wooding [Mon, 5 Aug 2019 15:13:13 +0000 (16:13 +0100)]
doc/sod.sty: Hoist `\@ifnextchar@preserve' further up.

4 years agosrc/parser/streams-{proto,impl}.lisp: Publish classes and generic functions.
Mark Wooding [Mon, 5 Aug 2019 14:10:50 +0000 (15:10 +0100)]
src/parser/streams-{proto,impl}.lisp: Publish classes and generic functions.

I bungled this somehow.  The exported classes should have ended up in
`streams-proto.lisp'.  I'm not, for now, exporting the proxy streams.

Because of this foolishness, I also failed to include documentation
stubs for any of these, so also add those.

4 years agodoc/misc.tex: Mention that `int' is magically exported.
Mark Wooding [Mon, 5 Aug 2019 13:56:19 +0000 (14:56 +0100)]
doc/misc.tex: Mention that `int' is magically exported.

Someone might care.

4 years agodoc/misc.tex: Include missing return values in synopses.
Mark Wooding [Mon, 5 Aug 2019 13:48:33 +0000 (14:48 +0100)]
doc/misc.tex: Include missing return values in synopses.

4 years agodoc/Makefile.am, doc/sod.tex: Include package version on title page.
Mark Wooding [Mon, 5 Aug 2019 13:27:50 +0000 (14:27 +0100)]
doc/Makefile.am, doc/sod.tex: Include package version on title page.

Maybe this should be in the running header or footer, but I'm not quite
sure where.

4 years agoNOTES: New file of things to think about.
Mark Wooding [Mon, 5 Aug 2019 10:09:32 +0000 (11:09 +0100)]
NOTES: New file of things to think about.

4 years agoMakefile.am: Distribute the `STYLE' guide.
Mark Wooding [Mon, 5 Aug 2019 10:09:08 +0000 (11:09 +0100)]
Makefile.am: Distribute the `STYLE' guide.

4 years agoasdf-hack.lisp.in: Shore up and distribute.
Mark Wooding [Mon, 5 Aug 2019 09:57:19 +0000 (10:57 +0100)]
asdf-hack.lisp.in: Shore up and distribute.

For a long time, this was a private hack.  Shoring up involved using
`*load-pathname*' to find the right directory, and /that/ requires
actually having the hack be in the build directory rather than the
source, and that involves having the makefile put it there, and then it
needs shipping.

4 years agoMakefile.am: Ship `emacs-hacks.el' on the offchance.
Mark Wooding [Mon, 5 Aug 2019 09:55:55 +0000 (10:55 +0100)]
Makefile.am: Ship `emacs-hacks.el' on the offchance.

It's tiny and harmless.

4 years agolib/sod.h (SOD_DECL): Check that we allocated the right size.
Mark Wooding [Mon, 5 Aug 2019 09:27:42 +0000 (10:27 +0100)]
lib/sod.h (SOD_DECL): Check that we allocated the right size.

4 years agolib/sod.h: Introduce `SOD_RECKLESS' feature macro to inhibit checking.
Mark Wooding [Mon, 5 Aug 2019 09:26:41 +0000 (10:26 +0100)]
lib/sod.h: Introduce `SOD_RECKLESS' feature macro to inhibit checking.

Currently there isn't any, but there will be soon.

4 years agodoc/runtime.tex: Suggest asserting that a stack-allocated object tore down.
Mark Wooding [Mon, 5 Aug 2019 09:22:48 +0000 (10:22 +0100)]
doc/runtime.tex: Suggest asserting that a stack-allocated object tore down.

As discussed, it's not an error in itself if an object refuses teardown:
that just means that you can forget about it and it's someone else's
problem now.  But if you really have to deallocate it right now, that's
not going to work.

It might be an idea to introduce a macro to say, essentially,

{ int rc = sod_teardown(OBJ); assert(!rc); }

4 years agolib/sod.3: Add missing documentation.
Mark Wooding [Mon, 5 Aug 2019 09:21:15 +0000 (10:21 +0100)]
lib/sod.3: Add missing documentation.

I must have just stopped midway through `SOD_DECL'.  Documentation for
`sod_teardown', `SOD_MAKE' and friends, and `sod_destroy' is entirely
absent.

4 years agosrc/output-proto.lisp: Fix some bad indentation.
Mark Wooding [Mon, 5 Aug 2019 09:19:42 +0000 (10:19 +0100)]
src/output-proto.lisp: Fix some bad indentation.

Bad Emacs.  No biscuit.

4 years agofrontend.lisp: Add hooks for extensions to add new command-line options.
Mark Wooding [Sun, 4 Aug 2019 18:04:10 +0000 (19:04 +0100)]
frontend.lisp: Add hooks for extensions to add new command-line options.

It seems rather pointless to document the option parser and then fail to
provide any way for extensions to make use of it.

Not that I've actually documented it yet...

4 years agosrc/optparse.lisp: Cope with options which don't have long names.
Mark Wooding [Sun, 4 Aug 2019 17:56:46 +0000 (18:56 +0100)]
src/optparse.lisp: Cope with options which don't have long names.

This makes the format strings remarkably hairy, but that just adds to
the fun, right?

4 years agosrc/optparse.lisp: Don't print options which have no help text.
Mark Wooding [Sun, 4 Aug 2019 17:52:36 +0000 (18:52 +0100)]
src/optparse.lisp: Don't print options which have no help text.

This seems better than crashing because nil isn't a thing that can have
characters extracted from it.

4 years agosrc/frontend.lisp: Add a function to update the `*usage*' list.
Mark Wooding [Sun, 4 Aug 2019 17:23:15 +0000 (18:23 +0100)]
src/frontend.lisp: Add a function to update the `*usage*' list.

4 years agosrc/frontend.lisp: Make the option parser available in a special variable.
Mark Wooding [Sun, 4 Aug 2019 17:21:01 +0000 (18:21 +0100)]
src/frontend.lisp: Make the option parser available in a special variable.

No effect at the moment, because nobody does anything with the variable.

4 years agosrc/codegen-proto.lisp (definst): Overhaul argument-list processing.
Mark Wooding [Sun, 4 Aug 2019 17:02:41 +0000 (18:02 +0100)]
src/codegen-proto.lisp (definst): Overhaul argument-list processing.

Previously I just used gensyms for the argument names.  That breaks
reloading the system, though: the classes get redefined with new slot
names, but the old instances continue to linger, only they don't work
properly any more.

Instead, write a proper lambda-list parser which allows slot names to be
specified independently of the user-facing argument names.

Of course, this now changes the way the `list-exports' machinery parses
`definst' forms.

4 years agosrc/module-impl.lisp (find-file): Take a home path rather than a scanner.
Mark Wooding [Sun, 4 Aug 2019 12:59:50 +0000 (13:59 +0100)]
src/module-impl.lisp (find-file): Take a home path rather than a scanner.

Honestly, picking the home path out of the scanner input was always a
bit of a stretch.

Obviously, we also need to fix up the callers, but there's only one of
them.

4 years agosrc/: Use the `optparse' package in `sod-user'.
Mark Wooding [Sun, 4 Aug 2019 12:54:24 +0000 (13:54 +0100)]
src/: Use the `optparse' package in `sod-user'.

This involves moving the `optparse' build into the main `sod' system.

4 years agosrc/utilities.lisp: Share `int' to `sod' and `optparse' packages.
Mark Wooding [Sun, 4 Aug 2019 12:48:52 +0000 (13:48 +0100)]
src/utilities.lisp: Share `int' to `sod' and `optparse' packages.

Now we don't have to choose between the C type and the option type.

4 years agodoc/module.tex: Add stub for missing function `clear-the-decks'.
Mark Wooding [Sun, 4 Aug 2019 09:25:19 +0000 (10:25 +0100)]
doc/module.tex: Add stub for missing function `clear-the-decks'.

4 years agodoc/misc.tex: Document some more miscellaneous utilities.
Mark Wooding [Sat, 3 Aug 2019 23:37:55 +0000 (00:37 +0100)]
doc/misc.tex: Document some more miscellaneous utilities.

4 years agosrc/utilities.lisp (dosequence): Capture SEQ as a variable explicitly.
Mark Wooding [Sat, 3 Aug 2019 23:21:33 +0000 (00:21 +0100)]
src/utilities.lisp (dosequence): Capture SEQ as a variable explicitly.

Previously it used `once-only', but that doesn't actually produce a
binding for constant expressions.

4 years agosrc/utilities.lisp (compose): Handle the case of zero arguments.
Mark Wooding [Sat, 3 Aug 2019 22:34:59 +0000 (23:34 +0100)]
src/utilities.lisp (compose): Handle the case of zero arguments.

4 years agodoc/misc.tex: Fix citation argument brackets.
Mark Wooding [Sat, 3 Aug 2019 20:16:21 +0000 (21:16 +0100)]
doc/misc.tex: Fix citation argument brackets.

4 years agodoc/clang.tex: Fix `\descref' call missing its category code.
Mark Wooding [Sat, 3 Aug 2019 20:15:57 +0000 (21:15 +0100)]
doc/clang.tex: Fix `\descref' call missing its category code.

4 years agodoc/: Reorder the arguments to `\descref'.
Mark Wooding [Sat, 3 Aug 2019 20:12:31 +0000 (21:12 +0100)]
doc/: Reorder the arguments to `\descref'.

We now have

\descref*{CAT}{NAME}[TEXT]

rather than

\descref*{NAME}[TEXT]{CAT}

which flows much better.  There's a complication, that `\@ifnextchar'
gobbles space while looking for its character: implement a custom
version which doesn't do that.

The call sites were mostly fixed by [long line]

$ sed -i '/\\descref\(\*\)\?\({[^}]\+}\(\[[^]]\+]\)\?\)\({[^}]\+}\)/ s//\\descref\1\4\2/g' doc/*.tex

but some calls run over two lines and had to be found and fixed by hand.

4 years agodoc/runtime.tex: Fix linking for `obj.teardown' message.
Mark Wooding [Sat, 3 Aug 2019 19:40:27 +0000 (20:40 +0100)]
doc/runtime.tex: Fix linking for `obj.teardown' message.

Use new `\descref*' and `\autopageref'.

4 years agodoc/: Add `*' option to `\descref' to suppress the page number.
Mark Wooding [Sat, 3 Aug 2019 19:39:09 +0000 (20:39 +0100)]
doc/: Add `*' option to `\descref' to suppress the page number.

Now you only get the hyperlink.

4 years agodoc/concepts.tex: Make a footnote a bit less stuffy.
Mark Wooding [Sat, 3 Aug 2019 19:09:07 +0000 (20:09 +0100)]
doc/concepts.tex: Make a footnote a bit less stuffy.

4 years agodoc/runtime.tex, lib/keyword.3: Explain the other benefit of `NO_KWARGS'.
Mark Wooding [Sat, 3 Aug 2019 19:07:08 +0000 (20:07 +0100)]
doc/runtime.tex, lib/keyword.3: Explain the other benefit of `NO_KWARGS'.

It's not just for hacking around C89 after all.

4 years agodoc/concepts.tex: Add some clarifications about initargs.
Mark Wooding [Sat, 3 Aug 2019 15:49:55 +0000 (16:49 +0100)]
doc/concepts.tex: Add some clarifications about initargs.

4 years agodoc/concepts.tex: Briefly explain translation-time metaobjects.
Mark Wooding [Sat, 3 Aug 2019 15:48:53 +0000 (16:48 +0100)]
doc/concepts.tex: Briefly explain translation-time metaobjects.

4 years agodoc/concepts.tex: Delete `no way to discover alignment for instance' claim.
Mark Wooding [Sat, 3 Aug 2019 15:47:15 +0000 (16:47 +0100)]
doc/concepts.tex: Delete `no way to discover alignment for instance' claim.

Replace with a reference to the `align' class slot.

4 years agodoc/misc.tex: Document many utilities.
Mark Wooding [Sat, 3 Aug 2019 15:46:46 +0000 (16:46 +0100)]
doc/misc.tex: Document many utilities.

4 years agodoc/misc.tex: Fix keyword argument name in `find-duplicates'.
Mark Wooding [Sat, 3 Aug 2019 15:41:53 +0000 (16:41 +0100)]
doc/misc.tex: Fix keyword argument name in `find-duplicates'.

4 years agodoc/misc.tex: `parse-body' is a function, not a macro.
Mark Wooding [Sat, 3 Aug 2019 15:40:21 +0000 (16:40 +0100)]
doc/misc.tex: `parse-body' is a function, not a macro.

4 years agodoc/misc.tex: Recategorize some descriptions.
Mark Wooding [Sat, 3 Aug 2019 15:36:24 +0000 (16:36 +0100)]
doc/misc.tex: Recategorize some descriptions.

  * `loc' is a locative thing, not a macro thing.

  * `distinguished-point-shortest-paths' doesn't do anything with lists.

  * `whitespace-char-p' doesn't track positions.

squash! doc/misc.tex: Recategorize some descriptions.

4 years agodoc/structures.tex: Confess to a slight lie about header files.
Mark Wooding [Sat, 3 Aug 2019 15:26:27 +0000 (16:26 +0100)]
doc/structures.tex: Confess to a slight lie about header files.

4 years agodoc/: Invent an override for `\xref' categories, and use it.
Mark Wooding [Sat, 3 Aug 2019 15:20:30 +0000 (16:20 +0100)]
doc/: Invent an override for `\xref' categories, and use it.

The most important thing here is to able to list two things as `sections
X and Y'.  I can't use plain `\ref' for this any more because I'm
relying on `\xref' to highlight the category name.

4 years agodoc/concepts.tex: Link to `SodObject' for the `init' message.
Mark Wooding [Sat, 3 Aug 2019 15:23:05 +0000 (16:23 +0100)]
doc/concepts.tex: Link to `SodObject' for the `init' message.

4 years agodoc/concepts.tex: Fix subclass/superclass confusion.
Mark Wooding [Sat, 3 Aug 2019 15:24:08 +0000 (16:24 +0100)]
doc/concepts.tex: Fix subclass/superclass confusion.

If I can't get this right, my readers don't stand a chance.

4 years agodoc/sod.sty: Highlight hyperlinks to descriptions better.
Mark Wooding [Sat, 3 Aug 2019 15:17:48 +0000 (16:17 +0100)]
doc/sod.sty: Highlight hyperlinks to descriptions better.

Make the name itself be a link, and highlight `page' as part of the page
link.

4 years agodoc/sod.sty: Index `*earmuffs*' and `:keywords' more usefully.
Mark Wooding [Sat, 3 Aug 2019 15:17:17 +0000 (16:17 +0100)]
doc/sod.sty: Index `*earmuffs*' and `:keywords' more usefully.

Using the new machinery.

4 years agodoc/sod.sty: Let the modifier control labelling and indexing.
Mark Wooding [Sat, 3 Aug 2019 15:16:40 +0000 (16:16 +0100)]
doc/sod.sty: Let the modifier control labelling and indexing.

4 years agodoc/sod.sty: Rename `descmod' to `modcat'.
Mark Wooding [Sat, 3 Aug 2019 15:15:15 +0000 (16:15 +0100)]
doc/sod.sty: Rename `descmod' to `modcat'.

There'll be more `mod...' things along soon.

4 years agodoc/sod.sty: Hoist `\@desc@dispatch' above its call sites.
Mark Wooding [Sat, 3 Aug 2019 15:12:29 +0000 (16:12 +0100)]
doc/sod.sty: Hoist `\@desc@dispatch' above its call sites.

4 years agodoc/sod.sty: Forbid page breaks between description header entries.
Mark Wooding [Sat, 3 Aug 2019 15:11:24 +0000 (16:11 +0100)]
doc/sod.sty: Forbid page breaks between description header entries.

4 years agodoc/sod.sty: Make internal PDF links go to the right places.
Mark Wooding [Sat, 3 Aug 2019 15:10:54 +0000 (16:10 +0100)]
doc/sod.sty: Make internal PDF links go to the right places.

4 years agodoc/runtime.tex: Line-wrapping failure.
Mark Wooding [Sat, 3 Aug 2019 15:08:57 +0000 (16:08 +0100)]
doc/runtime.tex: Line-wrapping failure.

4 years agodoc/structures.tex: Mention that the Sod examples are fictitious.
Mark Wooding [Sat, 3 Aug 2019 15:08:25 +0000 (16:08 +0100)]
doc/structures.tex: Mention that the Sod examples are fictitious.

4 years agodoc/structures.tex: Missing line break.
Mark Wooding [Sat, 3 Aug 2019 15:07:25 +0000 (16:07 +0100)]
doc/structures.tex: Missing line break.

4 years agodoc/concepts.tex: Fix description of C-fragment syntax.
Mark Wooding [Sat, 3 Aug 2019 15:06:59 +0000 (16:06 +0100)]
doc/concepts.tex: Fix description of C-fragment syntax.

4 years agolib/keyword.3, doc/concepts.tex: Mention performance of keyword arguments.
Mark Wooding [Sat, 3 Aug 2019 15:06:14 +0000 (16:06 +0100)]
lib/keyword.3, doc/concepts.tex: Mention performance of keyword arguments.

It's surprisingly not that bad.

4 years agolib/keyword.3: Missing word.
Mark Wooding [Sat, 3 Aug 2019 15:05:44 +0000 (16:05 +0100)]
lib/keyword.3: Missing word.

4 years agodoc/: Fix <metasyntactic-variable>s which were missing their `@'.
Mark Wooding [Sat, 3 Aug 2019 15:04:43 +0000 (16:04 +0100)]
doc/: Fix <metasyntactic-variable>s which were missing their `@'.

4 years agolib/sod.h: Fix formatting failure.
Mark Wooding [Sat, 3 Aug 2019 15:02:51 +0000 (16:02 +0100)]
lib/sod.h: Fix formatting failure.

4 years agolib/keyword.h, src/method-impl.lisp: Check user keywords first.
Mark Wooding [Sat, 3 Aug 2019 15:01:56 +0000 (16:01 +0100)]
lib/keyword.h, src/method-impl.lisp: Check user keywords first.

For better performance, check the user's specific keywords before the
magic built-in ones.

4 years agolib/keyword.h: Random commentary fixes.
Mark Wooding [Sat, 3 Aug 2019 15:01:21 +0000 (16:01 +0100)]
lib/keyword.h: Random commentary fixes.

4 years agolib/keyword.c, src/method-impl.lisp: Use `kw.valist' consistently.
Mark Wooding [Sat, 3 Aug 2019 15:00:09 +0000 (16:00 +0100)]
lib/keyword.c, src/method-impl.lisp: Use `kw.valist' consistently.

Argh.  I had `kw.va_list' intermixed.  Settle on the version without the
underscore (because it matches `K_VALIST' better).

4 years agosrc/builtin.lisp: Keep the first initarg in the list.
Mark Wooding [Sat, 3 Aug 2019 14:56:10 +0000 (15:56 +0100)]
src/builtin.lisp: Keep the first initarg in the list.

Otherwise a superclass unexpectedly defining an initarg will cause it to
be demoted relative to other initargs.

4 years agosrc/builtin.lisp: Don't assume we have an initializer if there are initargs.
Mark Wooding [Sat, 3 Aug 2019 14:55:03 +0000 (15:55 +0100)]
src/builtin.lisp: Don't assume we have an initializer if there are initargs.

This caused an ugly crash with the text

class Foo: SodObject {
  [initarg = x] int x;
}

4 years agosrc/class-make-impl.lisp: Attach initargs in the correct order.
Mark Wooding [Sat, 3 Aug 2019 14:53:21 +0000 (15:53 +0100)]
src/class-make-impl.lisp: Attach initargs in the correct order.

This is important for selecting the right slot initarg.

4 years agosrc/class-make-{proto,impl}.lisp: Don't make duplicate initargs.
Mark Wooding [Sat, 3 Aug 2019 14:20:46 +0000 (15:20 +0100)]
src/class-make-{proto,impl}.lisp: Don't make duplicate initargs.

If you set an initarg property on a slot definition which includes an
initializer then both the slot definition and the initializer act on the
initarg property and you end up with two initargs.  This isn't actually
a major problem, but it's ugly.

Add a new keyword argument to `make-sod-instance-initializer' to prevent
this from happening.