chiark / gitweb /
New feature: proper object lifecycle protocol; init and teardown fragments.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 14:09:04 +0000 (15:09 +0100)
commita42893dda5f4dd2b89fbfe4e497da261159225ca
tree7b68e3426cf89eb0d16451029b187c8655d52e93
parent27ec3825bd945bcdae0dca8ab2b4475c4722b313
New feature: proper object lifecycle protocol; init and teardown fragments.

A class definition may contain fragments of C code for initialization
and teardown.  Initialization fragments are invoked from the default
`init' message behaviour, in least-to-most specific order, immediately
after initializing the corresponding class's direct slots (if any);
teardown fragments are included in the default behaviour of a new
`teardown' message, in most-to-least specific order.

Now that we have initialization and teardown, we can implement more
useful object lifecycle functionality around them, e.g., dealing with
dynamically allocated objects.  Appropriate new definitions have been
added to the library.
17 files changed:
doc/SYMBOLS
doc/concepts.tex
doc/meta.tex
doc/runtime.tex
doc/structures.tex
doc/syntax.tex
lib/Makefile.am
lib/sod-hosted.c [new file with mode: 0644]
lib/sod-structs.3
lib/sod.c
lib/sod.h
src/builtin.lisp
src/class-make-impl.lisp
src/class-make-proto.lisp
src/classes.lisp
src/module-parse.lisp
src/sod-module.5