1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

module-type defined programmatically

* module/ice-9/boot-9.scm (make-record-type): Add an explanatory
  comment.
  (%print-module): Remove a hacky comment about redefinitions being
  difficult, because now the module-printer is called by name from
  module-type's printer.
  (module-type): Define the module type, its constructor, predicate, and
  accessors programmatically, at expansion time. Should reduce any
  errors in transcription, between adding fields and adding accessors.

* libguile/modules.c (scm_lookup_closure_module): Move an explanatory
  comment here from boot-9.scm.
This commit is contained in:
Andy Wingo 2010-04-20 12:34:05 +02:00
parent e31f22ebf0
commit 31ac29b621
2 changed files with 144 additions and 74 deletions

View file

@ -242,8 +242,14 @@ scm_lookup_closure_module (SCM proc)
{
SCM mod;
/* FIXME: The `module' property is no longer set. See
`set-module-eval-closure!' in `boot-9.scm'. */
/* FIXME: The `module' property is no longer set on eval closures, as it
introduced a circular reference that precludes garbage collection of
modules with the current weak hash table semantics (see
http://lists.gnu.org/archive/html/guile-devel/2009-01/msg00102.html and
http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2465
for details). Since it doesn't appear to be used (only in this
function, which has 1 caller), we no longer extend
`set-module-eval-closure!' to set the `module' property. */
abort ();
mod = scm_procedure_property (proc, sym_module);