Mark Wooding [Tue, 23 Jun 2020 09:27:20 +0000 (10:27 +0100)]
doc/misc.tex (aif): Spell out `alternative' in full.
Mark Wooding [Tue, 23 Jun 2020 09:23:39 +0000 (10:23 +0100)]
doc/concepts.tex: Add footnote compring Sod and CLOS initarg selection.
Sod initializes a slot from the most specific initarg supplied; CLOS
instead choose the leftmost initarg in the argument list.
Mark Wooding [Tue, 23 Jun 2020 09:22:32 +0000 (10:22 +0100)]
doc/misc.tex: Describe a couple of default methods explicitly.
On `instance-initargs' and `copy-instance-using-class'.
Mark Wooding [Tue, 23 Jun 2020 09:20:57 +0000 (10:20 +0100)]
src/utilities.lisp: Spell `locative' in full for the class and predicate.
It turns out not to be a frequently used type.
Mark Wooding [Tue, 23 Jun 2020 09:18:04 +0000 (10:18 +0100)]
doc/sod.sty: Report errors for undeclared description categories.
Mark Wooding [Tue, 23 Jun 2020 09:15:30 +0000 (10:15 +0100)]
doc/concepts.tex: Apparently `aging' is predominantly a US spelling.
Mark Wooding [Tue, 23 Jun 2020 09:09:59 +0000 (10:09 +0100)]
doc/clang.tex: Fix incorrect description category.
Mark Wooding [Tue, 23 Jun 2020 09:16:54 +0000 (10:16 +0100)]
lib/keyword.3.in, lib/sod-structs.3.in: Use `.VS' and `.VE'.
Mark Wooding [Tue, 23 Jun 2020 09:08:50 +0000 (10:08 +0100)]
man pages: Split out the common preamble and insert it at build time.
This machinery is taken from the TrIPE project.
Mark Wooding [Sun, 7 Jun 2020 23:54:39 +0000 (00:54 +0100)]
src/Makefile.am: Build `sod' if we're just distributing.
Mark Wooding [Sun, 7 Jun 2020 23:51:05 +0000 (00:51 +0100)]
doc/cutting-room-floor.tex: Add a diagram of Smalltalk's object braid.
Mark Wooding [Sun, 7 Jun 2020 23:49:49 +0000 (00:49 +0100)]
doc/sod.sty: Adjust the default dash pattern.
This is very finely adjusted to make a subsequent diagram come up right.
Mark Wooding [Sun, 7 Jun 2020 23:49:17 +0000 (00:49 +0100)]
doc/concepts.tex: Fix misformatting.
Mark Wooding [Sun, 7 Jun 2020 23:48:54 +0000 (00:48 +0100)]
doc/Makefile.am: Preserve `~' correctly in the version string.
Mark Wooding [Sat, 20 Feb 2021 22:48:56 +0000 (22:48 +0000)]
lib/sod-hosted.c (sod_makev): Use two statements rather than tricky expression.
Comes out shorter too.
Mark Wooding [Sat, 20 Feb 2021 22:48:01 +0000 (22:48 +0000)]
lib/sod.h (sod_sublassp): Fix function description.
The corresponding comment in the implementation file is already correct.
Mark Wooding [Sat, 20 Feb 2021 22:47:33 +0000 (22:47 +0000)]
src/parser/floc-proto.lisp: Use correct function for constructing conditions.
Mark Wooding [Mon, 7 Oct 2019 00:33:10 +0000 (01:33 +0100)]
configure.ac: Complicate ASDF version-number generation.
I've started prefixing a future-version-~ to development version
numbers, rather than maintenance pre-releases. Adjust the ASDF version
synthesis to cope with this.
Mark Wooding [Mon, 7 Oct 2019 00:13:57 +0000 (01:13 +0100)]
debian/: Ship `symbols' file for better downstream dependency versioning.
Mark Wooding [Mon, 7 Oct 2019 00:06:25 +0000 (01:06 +0100)]
debian/changelog: Prepare for next version.
Mark Wooding [Mon, 7 Oct 2019 00:04:51 +0000 (01:04 +0100)]
debian/: Bump to Debhelper 10.
For some reason, the `compat' level and the `Build-Depends' bound were
inconsistent. Oops.
Mark Wooding [Sun, 6 Oct 2019 22:03:42 +0000 (23:03 +0100)]
Static instance support.
Mark Wooding [Sun, 6 Oct 2019 21:52:37 +0000 (22:52 +0100)]
src/class-output.lisp: Leave `*instance-class*' unbound at top-level.
Mark Wooding [Sun, 6 Oct 2019 21:50:42 +0000 (22:50 +0100)]
src/class-make-{proto,impl}.lisp: Don't always add initializers to classes.
Add a switch `:add-to-class' to inhibit adding the new initializer
object to its class.
(The class is still necessary because it's in control of initializer
construction: otherwise I'd do this by passing a `nil' class.)
Mark Wooding [Sun, 6 Oct 2019 21:41:42 +0000 (22:41 +0100)]
src/method-impl.lisp, etc.: Add a `readonly' message property.
If you have a `const' instance, it's useful to be able to send it
messages, so add a facility for marking messages as not modifying their
receivers.
Mark Wooding [Sun, 6 Oct 2019 21:35:47 +0000 (22:35 +0100)]
src/method-{proto,impl}.lisp: Abstract out the receiver type.
The code used to just assume that receiver (`me') arguments had type
`CLASS *'. This is about to change...
Mark Wooding [Sun, 6 Oct 2019 21:26:27 +0000 (22:26 +0100)]
c-types-proto.lisp (canonify-qualifiers): Delete `nil' entries.
Now you can decide whether to include a qualifier by saying `(and COND
:const)' or similar, and the `nil' if COND is false will be swept under
the rug.
Mark Wooding [Sun, 6 Oct 2019 21:24:58 +0000 (22:24 +0100)]
doc/list-exports: Use `documentation' to find more categories.
Mark Wooding [Sun, 6 Oct 2019 21:24:13 +0000 (22:24 +0100)]
doc/check-docs (scansyms): Stop trying to parse at `Leaked slot names'.
Mark Wooding [Sun, 6 Oct 2019 23:17:59 +0000 (00:17 +0100)]
doc/output.tex: Add a missing member reference in vtable initializer.
Mark Wooding [Sat, 24 Aug 2019 23:12:46 +0000 (00:12 +0100)]
doc/: Switch to a manually maintained bibliography database.
Actually, the database is maintained mostly by Emacs's BibTeX mode. In
particular, I (mostly) allow it to choose the citation keys, rather than
using Beebe's somewhat annoying key format, so hack up the document to
match.
Mark Wooding [Sat, 24 Aug 2019 23:41:27 +0000 (00:41 +0100)]
configure.ac, doc/Makefile.am: Ship the bibliography style.
Well, the machinery to generate one, anyway.
Mark Wooding [Sat, 24 Aug 2019 20:58:59 +0000 (21:58 +0100)]
debian/: Fix build-dependencies for building the manual.
Mark Wooding [Sat, 24 Aug 2019 20:54:08 +0000 (21:54 +0100)]
configure.ac, doc/Makefile.am: Overhaul LaTeX building.
Check to see whether all of the things we need are available: don't try
to build the manual unless we have them.
Mark Wooding [Sat, 24 Aug 2019 16:18:18 +0000 (17:18 +0100)]
doc/sod.tex: Print the build version in the inside header.
Mark Wooding [Sat, 24 Aug 2019 16:14:51 +0000 (17:14 +0100)]
doc/...: Fix `\textbar' properly, and use plain `|'.
The `\grammar' command wasn't the right place to hack this, since
`\syntax' also needs fixing. Instead, patch `\syn@shorts' to do the
right thing.
Once this is done, use `|' rather than `@|' in syntax displays (not the
Lisp ones!). Also, use text rather than maths spacing consistently, by
replacing `$| \cdots |$' with `| $\cdots$ |' throughout.
Mark Wooding [Sat, 24 Aug 2019 16:11:34 +0000 (17:11 +0100)]
doc/sod.sty: Don't convert `_' to `-' in `\descref' text.
The conversion is necessary in the label, but not the text.
Mark Wooding [Fri, 23 Aug 2019 12:01:41 +0000 (13:01 +0100)]
doc/output.tex: Replace the old output-item comments with big tables.
Now the output structure is actually documented (somewhat) properly.
All I have to do is keep the tables up-to-date somehow.
Mark Wooding [Sat, 24 Aug 2019 10:07:21 +0000 (11:07 +0100)]
doc/output.tex: Fix synopsis for `sequence-output' macro.
Mark Wooding [Fri, 23 Aug 2019 12:00:49 +0000 (13:00 +0100)]
doc/sod.sty: Reintroduce toplevel `\kill' into `prog' environment.
Annoyingly, `longtable' steals `\kill' for its own purposes. Put it
back when we want it.
Mark Wooding [Fri, 23 Aug 2019 12:00:27 +0000 (13:00 +0100)]
doc/sod.sty: Reformat `\@prog' so that we can add more stuff.
Mark Wooding [Fri, 23 Aug 2019 11:59:25 +0000 (12:59 +0100)]
doc/sod.tex: Include `longtable'.
We're going to need it.
Mark Wooding [Fri, 23 Aug 2019 11:58:54 +0000 (12:58 +0100)]
doc/sod.tex: Leave a space for an `\includeonly' directive.
Mark Wooding [Fri, 23 Aug 2019 11:57:45 +0000 (12:57 +0100)]
doc/sod.tex: Cope if `\pkgversion' isn't defined.
Mark Wooding [Thu, 22 Aug 2019 23:42:06 +0000 (00:42 +0100)]
src/method-proto.lisp: Reflow a docstring paragraph.
Mark Wooding [Thu, 22 Aug 2019 23:39:07 +0000 (00:39 +0100)]
src/class-output.lisp: Add docstrings to the `hook-output' methods.
Mark Wooding [Thu, 22 Aug 2019 22:44:07 +0000 (23:44 +0100)]
src/class-output.lisp: Split up `hook-output' on `sod-class' and `:h'.
Introduce five new generic functions to carry most of the load. The
remaining `hook-output' functions all seem simple enough to be replaced
as necessary.
Mark Wooding [Thu, 22 Aug 2019 21:49:10 +0000 (22:49 +0100)]
src/class-output.lisp: Replace `Classes' with a more helpful title.
Mark Wooding [Thu, 22 Aug 2019 12:05:00 +0000 (13:05 +0100)]
src/output-proto.lisp, etc. (hook-output): Use standard combination.
This will let subclasses selectively override portions of the basic
output machinery.
The existing implicit traversal is now done via `:after' methods.
Existing hook methods which engaged custom traversal have been split out
into separate `:after' methods so that they don't get overridden by
accident.
The main output-class-to-header method (i.e., `hook-output' specialized
on `sod-class' and `(eql :h)') is huge and could usefully be split into
smaller pieces which can be overridden separately.
Mark Wooding [Thu, 22 Aug 2019 12:03:52 +0000 (13:03 +0100)]
src/module-parse.lisp (code): Allow setting constraints without a fragment.
Add new syntax for adding constraints to the output sequencer without
actually producing any output at all.
Mark Wooding [Thu, 22 Aug 2019 12:00:18 +0000 (13:00 +0100)]
src/module-parse.lisp (code): Prepare for an additional variant.
Some more minor refactoring: pull NAME [CONSTRAINTS] `{' FRAGMENT
`}' into an `or' subitem.
Mark Wooding [Thu, 22 Aug 2019 11:58:53 +0000 (12:58 +0100)]
src/module-parse.lisp (code): Hoist complex sub-items out of main parser.
Mark Wooding [Thu, 22 Aug 2019 11:54:50 +0000 (12:54 +0100)]
doc/syntax.tex: Give the REASON in a `code' definition a name.
Mark Wooding [Tue, 20 Aug 2019 19:52:07 +0000 (20:52 +0100)]
debian/control: Replace ancient `${Source-Version}' substitution.
Mark Wooding [Tue, 20 Aug 2019 19:48:16 +0000 (20:48 +0100)]
Makefile.am, test/Makefile.am: Add missing cleaning.
Mark Wooding [Tue, 20 Aug 2019 19:39:18 +0000 (20:39 +0100)]
test/Makefile.am: Make the stanzas more consistent.
We now have
* TESTS
* check_PROGRAMS
* EXTRA_DIST
* nodist_mumble_SOURCES
* BUILT_SOURCES
* mumble.out
* check-local
* -include
* CLEANFILES
in that order.
Mark Wooding [Tue, 20 Aug 2019 19:37:41 +0000 (20:37 +0100)]
test/Makefile.am: Disentangle `test' from `bad', and `rat' from `kwbench'.
Ugh!
Mark Wooding [Tue, 20 Aug 2019 19:27:05 +0000 (20:27 +0100)]
test/Makefile.am: Distribute `bad.sod' and `bad.ref'.
Oops.
Mark Wooding [Wed, 21 Aug 2019 13:41:27 +0000 (14:41 +0100)]
Reorganize some of the more random files.
* Move `sod.m4' and `sod.pc' into `lib/', because they're concerned
with the C library.
* Move `asdf-hack.lisp' and `emacs-hacks.el' into `src/', because
they're concerned with Lisp.
Mark Wooding [Wed, 21 Aug 2019 13:36:01 +0000 (14:36 +0100)]
sod.m4: The ACTION-IF-LIBRARY-FOUND should replace the default.
This is the behaviour I documented, but I failed to update the code to
match.
Mark Wooding [Tue, 20 Aug 2019 18:35:08 +0000 (19:35 +0100)]
sod.m4: Provide an Autoconf snippet for dependent packages.
Mark Wooding [Tue, 20 Aug 2019 16:05:50 +0000 (17:05 +0100)]
vars.am: Add missing `-M' in suffix-rules command.
Mark Wooding [Tue, 20 Aug 2019 14:03:58 +0000 (15:03 +0100)]
src/parser/parser-proto.lisp: Fix bogus indentation.
Mark Wooding [Tue, 20 Aug 2019 01:34:14 +0000 (02:34 +0100)]
src/lexer-{proto,impl}.lisp, src/pset-parse.lisp: Other C operators.
Add almost all of the familiar C operators. Some of these need their
own tokens added. There's a lexical gotcha now, since `x << y' and
`x < < y ...' mean different things: the former parses as `x shift-
left-by y', while the latter parses as `x is-less-than some-type-
beginning-with-y'.
Mark Wooding [Tue, 20 Aug 2019 10:30:52 +0000 (11:30 +0100)]
doc/syntax.tex: Reformat the various grammar fragments.
* Move the prose descriptions to the final case (e.g., for
<string-literal-char> and <char-literal-char>).
* Present alternatives on a single line where possible.
* Use centre-level dots consistently to denote elisions of
alternatives.
* Space alternatives consistently.
Mark Wooding [Tue, 20 Aug 2019 11:27:30 +0000 (12:27 +0100)]
doc/refintro.tex: Explain what parentheses mean in production rules.
They're used in the actual grammar, so this is probably a good idea.
Mark Wooding [Tue, 20 Aug 2019 11:26:50 +0000 (12:26 +0100)]
doc/refintro.tex: Split the syntax notation into subsections.
I'd be happier if these were subsubsections, honestly.
Mark Wooding [Tue, 20 Aug 2019 11:24:32 +0000 (12:24 +0100)]
doc/refintro.tex: Fix indexed-nonterminal argument abbreviation.
The thing with the unfinished ellipsis causes a very unpleasant effect
where dots at different heights are separated only by a comma.
Reluctantly, I fix this by replacing the nearly approachable `\$alpha |
\beta | ...' notation with numeric superscripts.
Mark Wooding [Tue, 20 Aug 2019 11:23:17 +0000 (12:23 +0100)]
doc/refintro.tex: Hoist $\epsilon$ to the top of the metasyntax section.
It's important, and liable to be lost otherwise.
Mark Wooding [Tue, 20 Aug 2019 11:28:01 +0000 (12:28 +0100)]
doc/Makefile.am: Add missing entry for `refintro.tex'.
Mark Wooding [Tue, 20 Aug 2019 01:31:25 +0000 (02:31 +0100)]
src/pset-parse.lisp: Replace `dispatch' by some more elementary functions.
This turns out to be an overall saving in terms of lines of code, as
well as being more versatile. The price is that we've lost the specific
per-operator type mismatch error, but I think that's worth paying.
Somewhat sneakily, I've also fiddled with the operator precedence
numbers, so as to leave more space for other operators, though the
relative precedences are unchanged.
Mark Wooding [Tue, 20 Aug 2019 01:26:17 +0000 (02:26 +0100)]
src/pset-parse.lisp: Add a little vertical space and commentary.
Mark Wooding [Tue, 20 Aug 2019 01:04:16 +0000 (02:04 +0100)]
src/pset-parse.lisp: Parse and evaluate expressions in two separate steps.
Previously, we'd parse and evaluate expressions in an interleaved
fashion: the items on the parser's value stack were (TYPE . VALUE)
pairs, fully evaluated.
This causes a couple of problems.
* Firstly, and most obviously, it means that we can't have operators
which perform short-circuit evaluation -- sometimes failing to
evaluate their operands. This doesn't seem like such a big deal:
after all, we don't have any assignment operators. But we /do/ have
an escape to Lisp's `eval' function via the `?' SEXP primary, and
evaluating Lisp can have arbitrary side-effects.
* Secondly, it makes error handling more annoying. There's logic
throughout for reporting continuable errors and then returning a
`:invalid' marker. This logic is currently concentrated in the
internal `dispatch' function, but continuing to maintain this
convention if and when we crack open `dispatch' to implement more
complex operators would be messy. (I know: I've tried it.)
Deferring evaluation to a second pass solves both problems. Control-
flow operators can just decide not to evaluate operands they're not
interested in. And errors can be caught and turned into an immediate
return from the `parse-expression' toplevel. (The `:invalid' convention
is still part of the external interface, for good reason, but it we can
just use Lisp's non-local control flow forms inside.)
The way this works is unsurprising. The `value' stack now holds thunks
which will calculate and return their values when invoked. Operators
close over the thunks for their operands and produce a new thunk which
will call the operand thunks as required to calculate their result. The
handling of `:invalid' in `dispatch' can be eliminated in favour of a
`restart-case' form around invoking the final value thunk.
The only remaining clever footwork is in `?' SEXP: if there's a read-
time error then we yields a thunk which immediately escapes and returns
`:invalid' from the toplevel. (We do this using `continue' on the
grounds that the read error has already been reported -- along,
probably, with a lot of knock-on parse errors while we try to
resynchronize with the source.)
Mark Wooding [Mon, 19 Aug 2019 19:48:41 +0000 (20:48 +0100)]
src/pset-parse.lisp: Remove the pointless `flet' function.
It's only used once and doesn't achieve very much of use.
Mark Wooding [Mon, 19 Aug 2019 19:44:32 +0000 (20:44 +0100)]
src/pset-parse.lisp: Bring `dispatch' within `parse-expression'.
There's nothing to be gained from keeping it outside: the `expr' parser
caching works on entry to the parser, rather than once only.
Mark Wooding [Tue, 13 Aug 2019 09:56:14 +0000 (10:56 +0100)]
src/parser/parser-expr-proto.lisp: Get `expr' to cache operators.
Add a new feature to `expr': if you write the operator parsers in a
special way, it will cache the operator objects around the whole
parser. Use this in the property-set expression parser. (Admittedly,
it previously cached the operators at load time, but there's an upcoming
change which will prevent this anyway.)
Mark Wooding [Mon, 12 Aug 2019 10:14:43 +0000 (11:14 +0100)]
src/pset-proto.lisp: Print type names in lowercase in error messages.
Mark Wooding [Mon, 12 Aug 2019 10:14:01 +0000 (11:14 +0100)]
src/pset-impl.lisp: Accept `yup' and `nope' as booleans.
I may draw the line at `yarp' and `narp'.
Mark Wooding [Mon, 12 Aug 2019 10:12:55 +0000 (11:12 +0100)]
src/pset-impl.lisp: Convert strings to booleans using a hash-table.
Mark Wooding [Mon, 12 Aug 2019 10:10:32 +0000 (11:10 +0100)]
src/: Use gender-neutral language in commentary.
Mark Wooding [Mon, 12 Aug 2019 10:09:03 +0000 (11:09 +0100)]
src/frontend.lisp: Remove unnecessary `:shadowing-import-from'.
When I unified the two `int' symbols, I forgot that this would have been
necessary.
Mark Wooding [Mon, 12 Aug 2019 10:08:23 +0000 (11:08 +0100)]
doc/syntax.tex: Clarify the term `root class'.
Mark Wooding [Mon, 12 Aug 2019 10:07:58 +0000 (11:07 +0100)]
doc/syntax.tex: Fix source formatting.
Mark Wooding [Sat, 10 Aug 2019 23:07:26 +0000 (00:07 +0100)]
doc/clang.tex: Remove redundant `\textbf{...}' inside `\thd'.
I noticed that I have a rather unpleasantly clone-and-hacked `\thd'
macro which already sets its argument in boldface; so there's no point
in emboldening it further.
Mark Wooding [Sat, 10 Aug 2019 21:40:17 +0000 (22:40 +0100)]
Recognize the <stdint.h> integer types.
There's a lot of these, and writing the whole lot out by hand is really
much less rewarding than writing a variety of Cartesian-product-
expanding programs. The really fun part was the TeX version...
Mark Wooding [Sat, 10 Aug 2019 21:39:13 +0000 (22:39 +0100)]
doc/clang.tex: Squish the `\desclabel' mess for simple C types.
No idea why I tolerated all of the `c-type-MUMBLE' repetition the first
time.
Mark Wooding [Sat, 10 Aug 2019 16:28:58 +0000 (17:28 +0100)]
test/kwbench.c, etc.: Tidy up and publish the keyword benchmark I used.
Mark Wooding [Sat, 10 Aug 2019 13:46:32 +0000 (14:46 +0100)]
src/module-impl.lisp, src/module-parse.lisp: Set module environment better.
Previously, `read-module' halfheartedly set `*package*' and
`*readtable*'. Do better, by setting lots of influential variables as
module variables with appropriate initial values.
Mark Wooding [Sat, 10 Aug 2019 02:11:21 +0000 (03:11 +0100)]
src/utilities.lisp, doc/misc.tex: Fix up `find-duplicates'.
* Fix the inconsistent ordering behaviour which was the cause of a
recent bug. The implementation for lists is rather ugly, but it
works without consing, which is a bonus.
* Document the ordering behaviour. And warn users away from non-
hash-table-friendly `:test' functions more firmly, especially on
lists.
Mark Wooding [Sat, 10 Aug 2019 00:17:00 +0000 (01:17 +0100)]
src/class-finalize-impl.lisp: Check for duplicates with the right `:test'.
I noticed that Sod failed to diagnose a class containing duplicate slot
names. Thinking that this was a stupid omission, I kludged a check into
`make-sod-slot' (and a matching check into `make-sod-message'), thinking
that it seemed rather difficult to provide a proper location of the
existing definition. Then I tripped over this code, and wondered why it
wasn't working. Of course, the problem was that it tries to compare
strings using `eql'. Fix this.
Use `equal' here rather than the more specific `string=' because (a)
`find-duplicates' uses a hashtable if the :test function is suitable,
and (b) it reports the duplicates in the right order in that
codepath. (That the other codepaths don't work the same way is, of
course, a bug which should be fixed.)
Mark Wooding [Sat, 10 Aug 2019 00:16:13 +0000 (01:16 +0100)]
src/parser/parser-proto.lisp: Muffle a `&optional ... &key ...' warning.
Somehow I missed this one.
Mark Wooding [Sat, 10 Aug 2019 00:15:03 +0000 (01:15 +0100)]
src/package.lisp, etc.: Muffle warnings about exported symbols etc.
SBCL gives big warnings if you re-evaluate a `defpackage' form and it
doesn't cover all of the exports and package uses. I simply don't care.
Mark Wooding [Fri, 9 Aug 2019 19:39:07 +0000 (20:39 +0100)]
src/method-proto.lisp: Maybe ignore the layout pointer in trampolines.
If the last trampoline is meant to invoke the delegation kernel, and the
kernel is for an aggregating message with no methods, then it probably
won't care about the layout pointer when it synthesizes its behaviour.
This results in an annoying compiler warning, which we can placate.
I originally considered doing this in `invoke-delegation-chain',
precisely in the case where the kernel is being included, but it's not
like we're being especially precise about other uses of `SOD__IGNORE',
so I've done the simpler thing instead.
Mark Wooding [Fri, 9 Aug 2019 19:36:42 +0000 (20:36 +0100)]
src/method-proto.lisp: Collect arguments in vanilla delegation trampolines.
In the keyword-arguments overhaul, somehow the case in `make-trampoline'
for trivially `augmenting' the argument list for a vanilla message, as
opposed to hairy varargs or keyword messages, got lost, with the result
that they ended up with no arguments at all. Needless to say, the C
compiler is unhappy about this.
Mark Wooding [Sat, 10 Aug 2019 13:48:07 +0000 (14:48 +0100)]
test/bad.sod: Test error reporting and recovery.
Huh, what do you know? That `demo' item has come back again.
Mark Wooding [Sat, 10 Aug 2019 13:43:39 +0000 (14:43 +0100)]
src/module-parse.lisp: Eliminate the old `demo' module item.
It was only there for early testing, and we don't need it any more.
Mark Wooding [Sat, 10 Aug 2019 10:50:08 +0000 (11:50 +0100)]
test/test.sod: Add a test for the class-pointer type bug.
Mark Wooding [Thu, 8 Aug 2019 19:07:48 +0000 (20:07 +0100)]
src/class-layout-impl.lisp: Fix class pointers in secondary chains.
Consider:
[link = SodClass] class MyClass: SodClass { }
[metaclass = MyClass] class Foo: SodObject { }
GCC reports:
/tmp/mdw/t.c:258:33: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
/* _class = */ &Foo__classobj.obj.myclass,
^
/tmp/mdw/t.c:258:33: note: (near initialization for ‘Foo__vtable_obj.obj._class’)
What's going on here is that it's writing the wrong metaclass pointer
into the `_class' pointer on `Foo''s secondary `obj' chain.
Fix this by choosing, for each class pointer, the most specific
superclass of the overall metaclass that is (a) on the correct chain of
the metaclass, and (b) is a superclass of the metaclass of the most
specific class in the chain whose vtable we're writing. Whew!
Mark Wooding [Thu, 8 Aug 2019 19:07:23 +0000 (20:07 +0100)]
src/class-finalize-impl.lisp: Fix bungled format string.
Mark Wooding [Thu, 8 Aug 2019 19:06:51 +0000 (20:06 +0100)]
src/optparse.lisp: Muffle warnings about `&optional ... &key ...'.