unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mikael Djurfeldt <mdjurfeldt@gmail.com>
Cc: Marius Vollmer <mvo@zagadka.de>, guile-devel@gnu.org
Subject: Re: module GC bug
Date: Sat, 9 Jul 2005 21:28:00 +0200	[thread overview]
Message-ID: <66e540fe05070912285b0ab674@mail.gmail.com> (raw)
In-Reply-To: <42CF8AA5.1080300@xs4all.nl>

On 7/9/05, Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:
> > That would be good, because the current fix (which is already
> > committed to CVS HEAD, and which removes the setting of the
> > procedure-property) still leaves code in modules.c which expects the
> > procedure-property to be set.  If Han-Wen's fix is to be kept, then
> > you should, at least, remove that code. The consequence is that it
> > will no longer be possible to lookup the module of the eval closure
> > for any kind of closures except the standard ones (which are
> > implemented as a smob).
> [...]
> I guess I'm missing something.  Where is the 'module procedure property
> set for other eval closures?

It was set in set-module-eval-closure! before this change:

2005-06-10  Han-Wen Nienhuys  <hanwen@xs4all.nl>

	* boot-9.scm (set-module-eval-closure!): remove
	set-procedure-property! closure 'module. Setting this property
	causes un-gc-able modules.

It is read by code in modules.c which (still) looks like this:

SCM
scm_lookup_closure_module (SCM proc)
{
  if (scm_is_false (proc))
    return the_root_module ();
  else if (SCM_EVAL_CLOSURE_P (proc))
    return SCM_PACK (SCM_SMOB_DATA (proc));
  else
    {
      SCM mod = scm_procedure_property (proc, sym_module); <--- HERE
      if (scm_is_false (mod))
	mod = the_root_module ();
      return mod;
    }
}

Eval closures can be any arbitrary procedure which fulfills the
obligations of an eval closure. This has been used in the guile-tcltk
interface to make Tcl variables and functions look like ordinary
Scheme variables. The SMOB eval closures is an optimization for the
standard case.

M


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2005-07-09 19:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-09 23:32 module GC bug Han-Wen Nienhuys
2005-06-10  6:32 ` Neil Jerram
2005-06-10 11:48   ` Han-Wen Nienhuys
2005-06-19 13:32   ` Han-Wen Nienhuys
2005-06-19 17:33     ` Rob Browning
2005-07-07 18:48     ` Marius Vollmer
2005-06-24 17:50   ` Han-Wen Nienhuys
2005-07-07 18:42 ` Marius Vollmer
2005-07-08  9:24   ` Mikael Djurfeldt
2005-07-09  8:28     ` Han-Wen Nienhuys
2005-07-09 19:28       ` Mikael Djurfeldt [this message]
2005-07-09 23:25         ` Han-Wen Nienhuys
2005-07-10  8:16           ` Mikael Djurfeldt
2005-07-09 23:32         ` Han-Wen Nienhuys
2005-07-10  8:17           ` Mikael Djurfeldt
2005-07-08 21:43   ` Han-Wen Nienhuys
2005-07-13 21:02     ` Marius Vollmer
2005-07-13 22:19       ` Han-Wen Nienhuys
2005-07-16 18:57         ` Marius Vollmer
2005-07-17 18:50           ` Han-Wen Nienhuys
2005-07-17 20:44             ` Marius Vollmer
2005-07-18 13:43               ` Han-Wen Nienhuys
2005-08-01  0:20 ` Marius Vollmer
2005-08-01 11:04   ` Han-Wen Nienhuys
2005-08-10 22:29     ` Marius Vollmer
2005-08-15 23:57       ` Rob Browning
2005-08-16  0:10         ` Marius Vollmer
2005-08-16  0:16         ` Rob Browning
2005-08-28 23:31           ` Han-Wen Nienhuys
     [not found]   ` <42EE63F9.4080102@xs4all.nl>
2005-08-02 19:14     ` Marius Vollmer
     [not found]   ` <42F1DF3E.70204@xs4all.nl>
2005-08-05 14:48     ` Han-Wen Nienhuys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66e540fe05070912285b0ab674@mail.gmail.com \
    --to=mdjurfeldt@gmail.com \
    --cc=djurfeldt@nada.kth.se \
    --cc=guile-devel@gnu.org \
    --cc=mvo@zagadka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).