This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using more than one interpreter


Kellom{ki Pertti <pk@cs.tut.fi> writes:

> I would like each table to have its own instance of Scheme (or
> equivalently a separate top level environment). I could not accomplish
> this with 1.6.70, and the source indicates that the functionality to
> do it is not finished. Are there workarounds that I could use, or is
> the functionality present in later versions?

First, you may not realize that using separate top-level environments
requires using separate threads - and specifically Futures.  Rather,
you can have as many environments as you like - but the "current"
environment is found by Environment.getCurrent(), which checks if the
current thread is a Future.

Secondly, there are a number of knowm problems with the implementation
of environments.  I think fixing these problems is very urgent.  I
don't know for sure which one specifically is biting you. I am
starting on the problem of *imported* bindings.  Currently, if a
function references a variable (or function) foo, which is unknown at
compile time, the compiler essentially generates:

  static Binding id$foo = ...

  Object bar(...) { ... id$foo.get() ... }

The problem is that id$foo is static.  It really should not be.
I'm working on fixing this now.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]