chiark / gitweb /
sod
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 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.

8 years agodoc/list-exports.lisp: Check for anomalies when preparing reports.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Check for anomalies when preparing reports.

8 years agodoc/list-exports.lisp: Some sketchy code to report on exported symbols.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
doc/list-exports.lisp: Some sketchy code to report on exported symbols.

Currently produces a list with category indications, and a class
hierarchy.  Useful for preparing documentation.

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

Various small bugs:

  * Some symbols which should have been exported weren't.

  * One export was mispslet.

  * One export was duplicated.

  * One was a failed attempt to export an instruction, but `definst' can
    do that properly now.

8 years agosrc/final.lisp, src/frontend.lisp: Compile methods before dumping.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/final.lisp, src/frontend.lisp: Compile methods before dumping.

Exercise the method machinery so we don't have to run the compiler as
much after dumping.

8 years agosrc/frontend.lisp: Prepare the builtin module at load time.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/frontend.lisp: Prepare the builtin module at load time.

This is better because load time happens before the image is dumped.

Also, remove some pointless `clear-the-decks' calls.

8 years agosrc/final.lisp: Rename from `debug.lisp'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/final.lisp: Rename from `debug.lisp'.

It's going to get more stuff.

8 years agovars.am, lib/: Add some manual pages for the library.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
vars.am, lib/: Add some manual pages for the library.

8 years agolib/sod.h: Arrange that `SOD_XCHAIN' returns `void *'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
lib/sod.h: Arrange that `SOD_XCHAIN' returns `void *'.

8 years agolib/sod.h, src/class-output.lisp: Rename `SOD__CAR' to `SOD_CAR'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
lib/sod.h, src/class-output.lisp: Rename `SOD__CAR' to `SOD_CAR'.

8 years agosrc/class-output.lisp: Make `__CONV_' macros more robust.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-output.lisp: Make `__CONV_' macros more robust.

If the formal argument name is a simple identifier, then things come
unstuck when there's a chain head with that same nickname.  So make the
argument name be something which isn't allowed as a class nickname.

8 years agosrc/: Stuff vtable structures into a union.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Stuff vtable structures into a union.

For the same reason that ichains are collected into a union: to force
the compiler's hand into getting the various members to overlap in the
common prefixes.

This doesn't affect day-to-day use, but it does change the types of the
things which are actually exported.

8 years agolib/sod.h: Make the `_vt' member of `sod_instance' be pointer-to-const.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
lib/sod.h: Make the `_vt' member of `sod_instance' be pointer-to-const.

8 years agosrc/frontend.lisp: The command-line options aren't crazy any more.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/frontend.lisp: The command-line options aren't crazy any more.

8 years agotest/chimaera.sod: Reorder Serpent tickling decision.
Mark Wooding [Mon, 7 Sep 2015 14:20:11 +0000 (15:20 +0100)]
test/chimaera.sod: Reorder Serpent tickling decision.

It makes more sense to me to have the actions in the order they'll be
experienced.

8 years agotest/chimaera.sod: Use the macros for sending messages.
Mark Wooding [Mon, 7 Sep 2015 14:13:12 +0000 (15:13 +0100)]
test/chimaera.sod: Use the macros for sending messages.

Rather than digging about in `_vt' directly.

8 years agoMakefile.am, debian/: Initial packaging; release 0.2.0. 0.2.0
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Makefile.am, debian/: Initial packaging; release 0.2.0.

8 years agoMakefile.am: Include a pkgconfig file.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Makefile.am: Include a pkgconfig file.

8 years agoInclude `confsubst' machinery.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Include `confsubst' machinery.

8 years agoMakefile.am: Write release number into distribution packages.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Makefile.am: Write release number into distribution packages.

8 years agoMakefile.am: Actually distribute the `auto-version' script.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
Makefile.am: Actually distribute the `auto-version' script.

8 years agosrc/Makefile.am: Install `parser' files in the correct place.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/Makefile.am: Install `parser' files in the correct place.

We have to use the `nobase_...' variable, which is waaay too long.  So
invent our own variable `LISP_SOURCES' and use that instead.

8 years agosrc/Makefile.am: Distribute `src/parser/package.lisp'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/Makefile.am: Distribute `src/parser/package.lisp'.

8 years agosrc/Makefile.am, src/test-base.lisp: Check version numbers match.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/Makefile.am, src/test-base.lisp: Check version numbers match.

We have version numbers in two places, and that's no good, but I can't
see a good way of generating the Lisp package version from the Git
version, so I'm just going to add a test that they match.

It's not a perfect test, but it ought to do.

8 years agosrc/Makefile.am: Improve test running rule.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/Makefile.am: Improve test running rule.

Catch errors and print them briefly rather than having a full stack
backtrace.

8 years agosrc/test-base.lisp: Actually signal an error if the tests fail.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/test-base.lisp: Actually signal an error if the tests fail.

8 years agosrc/parser/parser-test.lisp: Suppress maybe-unused variable warning.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/parser/parser-test.lisp: Suppress maybe-unused variable warning.

8 years agosrc/c-types-parse.lisp: Some better comment formatting.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-parse.lisp: Some better comment formatting.

8 years agosrc/c-types-parse.lisp: Handle `...' in prefix-`(' disambiguation.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-parse.lisp: Handle `...' in prefix-`(' disambiguation.

Now that we've actually got the machinery to parse ellipses in function
argument lists, it'd be nice to do it properly.

(I think -- but I might be wrong -- that the reason this wasn't done
before is that C doesn't let you put `...' as the only thing in an
argument list, because you need to have a named argument to initialize
the `va_list'.  But Sod can, and does, because there's always at least a
receiver argument.)

8 years agosrc/module-parse.lisp: Reinstate `peek' around the main item parser.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/module-parse.lisp: Reinstate `peek' around the main item parser.

This was removed for debugging.  Now we can parse slot initializers
again.

The error handling for class items is still pretty awful and needs
fixing.

8 years agosrc/module-parse.lisp: Don't allow a method body on a varargs message def.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/module-parse.lisp: Don't allow a method body on a varargs message def.

It doesn't work because the method will have the wrong type.

8 years agosrc/class-make-impl.lisp: Make `make-sod-MUMBLE' actually return a MUMBLE.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-make-impl.lisp: Make `make-sod-MUMBLE' actually return a MUMBLE.

8 years agosrc/method-{proto,impl}.lisp: Add `:valist' method-entry role.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-{proto,impl}.lisp: Add `:valist' method-entry role.

For each varargs message, add a new entry whose name has a `__v' suffix,
and which takes a `va_list' argument in place of the variable-length
argument list of the `nil' entry.  The `nil' entry now just sets up the
`va_list' pointer and invokes the corresponding `:valist' entry function.

This actually makes constructing the method-entry functions somewhat
cleaner, since the handling of variable argument lists is now
concentrated in the construction of a separate entry function.

8 years agosrc/: Allow methods to have more than one entry each in a vtable.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Allow methods to have more than one entry each in a vtable.

The entries are assigned distinct `roles' to distinguish them.  Each
role can have a different type.  To accommodate this a number of changes
are made to the API.  Note that no roles other than the standard `nil'
role are currently defined, so none of this change should have any
externally observable effect.

  * The `make-method-entry' method is replaced by `make-method-entries',
    which returns a list of entry objects.  The standard method on
    `compute-vtmsgs' collects these together into a big list.

  * Slots in the `vtmsgs' structure are now given names by the method
    entries directly, rather than being named after their messages.
    There is a new generic function `method-entry-slot-name' to make
    this work, and a little protocol `method-entry-slot-name-by-role' to
    make extending this machinery easy.

  * The `message-macro-name' function now takes a method-entry rather
    than a message, because each entry needs its own macro.

  * The `method-entry-function-name' function has grown an additional
    `role' argument.  The standard method inserts a non-nil role name in
    an unimaginative manner.

  * The standard method on `method-entry-function-type' now inspects the
    entry role, but its behaviour is unchanged except to check that the
    role is nil.

8 years agosrc/method-impl.lisp (compute-method-entry-functions): Simplify `parm-n'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-impl.lisp (compute-method-entry-functions): Simplify `parm-n'.

8 years agosrc/method-impl.lisp (compute-method-entry-functions): Reorder `let*'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-impl.lisp (compute-method-entry-functions): Reorder `let*'.

Currently the `method entry details' and `effective method function
details' blocks are independent, but they won't be soon.

8 years agosrc/: Tweak handling of `va_list' pointers in generated functions.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Tweak handling of `va_list' pointers in generated functions.

In method entries, effective method bodies, and delegation trampolines,
the `va_list' argument is named `sod__ap', and a copy is made for
invoking direct methods into a temporary called `sod__tmp_ap'.  The name
`sod__master_ap' is now only used in direct method argument lists and
the `CALL_NEXT_METHOD' machinery.

This reduces the amount of mangling of argument lists which needs to be
done.  It will also make some future changes a little easier.

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

The extra `ap' argument comes at the front, not the end.  Trim the final
ellipsis instead of (wrongly) trying to convert it.

8 years agosrc/method-impl.lisp: Don't mangle `ap' name in `basic-argument-names'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-impl.lisp: Don't mangle `ap' name in `basic-argument-names'.

It's already correct.  If we change it then there'll be two `master_ap'
arguments when we invoke the method.

8 years agosrc/method-impl.lisp: Argument name list should only contain names.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-impl.lisp: Argument name list should only contain names.

The whole argument object prints wrongly and makes a mess in the output.

8 years agosrc/method-impl.lisp: Handle varargs methods in `next-method-type'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-impl.lisp: Handle varargs methods in `next-method-type'.

8 years agosrc/debug.lisp: Write output to a well-known file.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/debug.lisp: Write output to a well-known file.

This way, Emacs can display it properly fontified in a buffer, and
refresh when it gets changed, rather than having an enormous dump of
text in the middle of a REPL session.

8 years agosrc/c-types-parse.lisp: Plain types don't have `declspec' slots.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-parse.lisp: Plain types don't have `declspec' slots.

Type names count as declaration specifiers, so `scan-declspec' has to
cope with them.  Fortunately, bare types don't come with tags, so this
is easy to work around.

8 years agosrc/class-utilities.lisp: Compare C types with the right function.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-utilities.lisp: Compare C types with the right function.

There's something weird with the caching, I think.  But this way leaves
a better taste anyway.

8 years agosrc/class-output.lisp: Remove debugging hack.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/class-output.lisp: Remove debugging hack.

8 years agosrc/: Argument lists don't only contain `argument' objects.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/: Argument lists don't only contain `argument' objects.

They can also contain `:ellipsis' markers.

8 years agosrc/c-types-parse.lisp: Parse `...' in argument lists.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/c-types-parse.lisp: Parse `...' in argument lists.

Somehow this got missed out.  There are a number of bugs elsewhere,
where things can't cope with the `:ellipsis' marker, to be fixed in
subsequent commits.

8 years agosrc/method-aggregate.lisp: Expose number of methods to custom combination.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-aggregate.lisp: Expose number of methods to custom combination.

This permits pre-allocating an array for collecting results, for
example.  Suggested by Tony Finch.

8 years agolib/sod.h, src/class-{output,utilities}.lisp: Macros for messages.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
lib/sod.h, src/class-{output,utilities}.lisp: Macros for messages.

Emit a C macro for each message defined, which just saves the ugly
messing duplication of the receiver and the messing about with vtables.

This feature isn't stable yet, so don't rely on it not changing.  For
example, I've not yet decided on whether or not to uppercase the message
name.

8 years agosrc/method-aggregate.lisp: Move return-type check into `define-' macro.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-aggregate.lisp: Move return-type check into `define-' macro.

It seems a better fit this way.

8 years agosrc/method-aggregate.lisp: Fix export for `aggregating-effective-method'.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-aggregate.lisp: Fix export for `aggregating-effective-method'.

8 years agosrc/method-aggregate.lisp: Give aggregating combinations their own file.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/method-aggregate.lisp: Give aggregating combinations their own file.

The code has been reordered a little too, but there are no substantive
changes.

8 years agosrc/classes.lisp, src/class-layout-proto.lisp: Docstring fixes.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/classes.lisp, src/class-layout-proto.lisp: Docstring fixes.

Specifically, name literal symbols in lowercase, with quotes, to
distinguish from metasyntactic variables.

8 years agolib/sod.h, test/chimaera.sod: Promote `SOD_DECL' to the library header.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
lib/sod.h, test/chimaera.sod: Promote `SOD_DECL' to the library header.

It seems generally useful.

8 years agotest/: Make `nml.tickle' be a `progn' method.
Mark Wooding [Sun, 30 Aug 2015 11:59:22 +0000 (12:59 +0100)]
test/: Make `nml.tickle' be a `progn' method.

I think this was always intended, but I didn't have the method
combination until now.

8 years agotest/chimaera.sod: Don't use `(void)' for message argument lists.
Mark Wooding [Sun, 30 Aug 2015 10:08:11 +0000 (11:08 +0100)]
test/chimaera.sod: Don't use `(void)' for message argument lists.

It's inaccurate because more arguments are added later.

8 years agosrc/class-make-{proto,impl}.lisp: Better choice of default message class.
Mark Wooding [Sun, 30 Aug 2015 10:07:21 +0000 (11:07 +0100)]
src/class-make-{proto,impl}.lisp: Better choice of default message class.

If a combination is specified, use the new `aggregating-message' by
default.

8 years agosrc/method-impl.lisp: New protocol for aggregating method combinations.
Mark Wooding [Sun, 30 Aug 2015 10:06:13 +0000 (11:06 +0100)]
src/method-impl.lisp: New protocol for aggregating method combinations.

8 years agosrc/method-impl.lisp: Invoke `after' methods, even in `void' messages.
Mark Wooding [Sat, 29 Aug 2015 13:36:34 +0000 (14:36 +0100)]
src/method-impl.lisp: Invoke `after' methods, even in `void' messages.

Previously, the code would have suppressed them for some bizarre
reason.

The `voidp' variable is no longer needed, so remove it.

8 years agosrc/method-impl.lisp: Fix incorrect argument order.
Mark Wooding [Sat, 29 Aug 2015 13:33:40 +0000 (14:33 +0100)]
src/method-impl.lisp: Fix incorrect argument order.

8 years agosrc/method-impl.lisp: There's a handy definition `c-type-void', so use it.
Mark Wooding [Sat, 29 Aug 2015 13:33:02 +0000 (14:33 +0100)]
src/method-impl.lisp: There's a handy definition `c-type-void', so use it.

8 years agosrc/method-impl.lisp: Remove unnecessary `with-slots' form.
Mark Wooding [Sat, 29 Aug 2015 13:13:01 +0000 (14:13 +0100)]
src/method-impl.lisp: Remove unnecessary `with-slots' form.

8 years agosrc/method-impl.lisp: Typo in docstring.
Mark Wooding [Sat, 29 Aug 2015 13:12:07 +0000 (14:12 +0100)]
src/method-impl.lisp: Typo in docstring.

8 years agosrc/method-impl.lisp: Default method for `primary-method-class'.
Mark Wooding [Sat, 29 Aug 2015 13:11:42 +0000 (14:11 +0100)]
src/method-impl.lisp: Default method for `primary-method-class'.

The `basic-direct-method' class seems like an appropriate choice.

8 years agosrc/module-impl.lisp: Don't emit `#line' to non-position-aware streams.
Mark Wooding [Sun, 30 Aug 2015 10:03:22 +0000 (11:03 +0100)]
src/module-impl.lisp: Don't emit `#line' to non-position-aware streams.

Because we can't switch back afterwards, the compiler will blame the
wrong thing.  Also, if the output stream isn't position-aware, it's
probably because we're in the midst of pretty-printing something, and
forcing `#line' directives will produce hideous results.

This is all rather unfortunate.  It's clearly a bug that we can't
produce pretty output and have useful error location information, but I
think this is the best I can manage right now.

8 years agosrc/classes.lisp: Add comment explaining why psets aren't captured.
Mark Wooding [Sun, 30 Aug 2015 09:57:57 +0000 (10:57 +0100)]
src/classes.lisp: Add comment explaining why psets aren't captured.

This one had me wondering for a while, but it turns out there's a good
reason.

8 years agosrc/: Rename the various `:lisp-class' properties.
Mark Wooding [Sat, 29 Aug 2015 14:11:55 +0000 (15:11 +0100)]
src/: Rename the various `:lisp-class' properties.

Instead, there's now a separate property for each kind of metaobject.
The reason is that some declarations can produce two metaobjects, e.g.,
a message declaration might also include a direct method, and we can't
possibly use the same metaobject class for both.  To resolve this, we
use different properties to name the different metaobject classes.

  * For classes, we use `:lisp-metaclass' (to distinguish from a runtime
    metaclass).

  * For messages, `:message-class'.

  * For methods, `:method-class'.

  * For slots, `:slot-class'.

  * For slot initializers, `:initializer-class'.

  * For modules, `:module-class'.

8 years agosrc/pset-parse.lisp: Allow brace-enclosed fragments as property values.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/pset-parse.lisp: Allow brace-enclosed fragments as property values.

8 years agosrc/codegen-{proto,impl}.lisp: Protocol for emitting custom declarations.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/codegen-{proto,impl}.lisp: Protocol for emitting custom declarations.

8 years agosrc/codegen-proto.lisp: Include `;' in `var-inst' output.
Mark Wooding [Sun, 30 Aug 2015 09:59:45 +0000 (10:59 +0100)]
src/codegen-proto.lisp: Include `;' in `var-inst' output.

Because other kinds of decls will have their own semicolons.  Previously
the semicolons were added as part of the block output machinery.

8 years agosrc/{codegen,method}-impl.lisp: Allow non-variables in `vars' lists.
Mark Wooding [Sun, 30 Aug 2015 10:04:18 +0000 (11:04 +0100)]
src/{codegen,method}-impl.lisp: Allow non-variables in `vars' lists.

It used to be assumed that everything in the `vars' list was a
`var-inst' object, but that's not going to be true any more.

8 years agosrc/codegen-proto.lisp: A small number of new instructions.
Mark Wooding [Sat, 29 Aug 2015 13:09:54 +0000 (14:09 +0100)]
src/codegen-proto.lisp: A small number of new instructions.

8 years agosrc/codegen-{proto,impl}.lisp: Have `definst' optionally export symbols.
Mark Wooding [Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)]
src/codegen-{proto,impl}.lisp: Have `definst' optionally export symbols.

The enormous export lists are annoying to maintain.

8 years agosrc/sod.asd: Elide a transitively implied dependency.
Mark Wooding [Sat, 29 Aug 2015 12:20:49 +0000 (13:20 +0100)]
src/sod.asd: Elide a transitively implied dependency.

8 years agosrc/sod.asd: Fix another missing dependency.
Mark Wooding [Sat, 29 Aug 2015 12:20:28 +0000 (13:20 +0100)]
src/sod.asd: Fix another missing dependency.

8 years agosrc/debug.lisp: New small utility function for interactive testing.
Mark Wooding [Sat, 29 Aug 2015 12:19:33 +0000 (13:19 +0100)]
src/debug.lisp: New small utility function for interactive testing.

Testing at the command line is OK when things can be expected to work,
but it's annoying when they're likely to break.  This simple function
makes things pleasant to debug from inside SLIME.

8 years agopre-reorg/: Delete this old cruft.
Mark Wooding [Tue, 25 Aug 2015 16:46:54 +0000 (17:46 +0100)]
pre-reorg/: Delete this old cruft.

8 years agolib/sod.[ch]: The runtime library is LGPL.
Mark Wooding [Tue, 25 Aug 2015 16:44:54 +0000 (17:44 +0100)]
lib/sod.[ch]: The runtime library is LGPL.

8 years agovars.am, */Makefile.am: Improve silent-rules building.
Mark Wooding [Tue, 25 Aug 2015 09:44:20 +0000 (10:44 +0100)]
vars.am, */Makefile.am: Improve silent-rules building.

New silent-rules handling for Lisp dumping, testing, and for generating
Sod outputs.

8 years agodoc/: Work in progress.
Mark Wooding [Tue, 25 Aug 2015 09:27:36 +0000 (10:27 +0100)]
doc/: Work in progress.