[DGD]compile_object() kfun

John West McKenna john at ucc.gu.uwa.edu.au
Wed Mar 14 10:15:30 CET 2001


Felix A. Croes writes:

>My alternative hypothesis is that since recompiling an existing
>object does not call create() in the object, the object is not
>re-initialized and keeps using the old data.

That was what I guessed, but I was going to try some experiments before
posting.

inferno's upgrader builds a list of objects that need recompiling, calls
uninit() on them, then upgrading(), then recompiles, then calles upgraded()
and finally init().

uninit() and init() are expected to do everything that's required when an
object moves from one place to another except the actual move.  This
includes removing/adding commands defined by the object from/to the user's
grammar table.

upgrading() and upgraded() are very rarely used.  They're there for when
the new version of the code needs extra initialising.

The auto-upgrader builds a dependancy tree from inherits, includes, and
calls from the object to a depends() function.  The object can declare its
dependance on any files or directories (directory dependence allows the
object to be re-initialised when (for example) a new soul command file is
added).

This wasn't designed.  It just happened as I realised "oh, it has to do
*that* too!".  I can't remember if I ever got it to cope with dependance on
directories that don't exist yet.  inferno's soul is rather complicated.

John

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list