Maybe change the global environment to be a hash table? OK with me either way.
On Fri, Nov 20, 2009 at 9:57 PM, Taylor R Campbell <[email protected]> wrote: > Attached is a patch[*] to intern symbols weakly, so that unused > symbols can be garbage-collected. This sounds like it should be > trivial, but there is a complication because the `global' environment > is represented implicitly by an extra slot in each symbol for its > value in that environment. To accomodate this, the patch strongly > interns symbols bound in the global environment: defining or > undefining a global variable strengthens or weakens its reference in > the symbol table, which may have the consequence of slightly slowing > down linking and interpreting definitions in the system global > environment. > > I think I have covered all the cases in lookup.c requiring > strengthening or weakening symbols; Scheme stably runs a test > involving defining lots of symbols with randomly generated names in > the system global environment and then undefining them, although that > doesn't test everything. A secondary GC daemon deletes broken entries > from the symbol table if space is short. > > Comments (other than that the strengthening and weakening mechanism is > a crock)? Worth committing? I think garbage-collecting symbols is > the right thing -- the only question is whether this approach to > making them collectable is too hairy. > > [*] Apply weaksym.patch with `patch -p1 < /path/to/weaksym.patch' from > the top level of the Git repository. > > _______________________________________________ > MIT-Scheme-devel mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/mit-scheme-devel > > _______________________________________________ MIT-Scheme-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/mit-scheme-devel
