This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Using more than one interpreter
- To: Kellom{ki Pertti <pk at cs dot tut dot fi>
- Subject: Re: Using more than one interpreter
- From: per at bothner dot com
- Date: 08 Nov 2000 11:24:26 -0800
- Cc: kawa at sources dot redhat dot com
- References: <200011061701.TAA27870@korppi.cs.tut.fi>
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/