Stackless/microthreads merge news

Christian Tismer tismer at tismer.com
Sat May 13 14:44:49 EDT 2000


Paul Prescod wrote:
> 
> Christian Tismer wrote:
> >
> > ...
> >
> > I've been looking quite closely at their code.
> > This is quite a task. Stuff is well written,
> > but it is much if you are not used to it.
> 
> I have been wondering for a while if it would be possible to merge the
> Python interpreter with a Java VM so that Python and JPython themselves
> could be merged. I think it would be cool to have a single
> implementation with access to all Java classes and all Python extensions
> too. That would be the ultimate glue language!

JPython's and CPython's implementations are completely
different. There is no equivalent form CPython's frames
in JPython.
While it sounds nice, I guess both would need a complete
rewrite to be merged.

> I would guess that the Python compiler would generate JVM byte codes
> with a few optimization bytecodes that could be "turned off" to be
> compatible with standard byte codes.

Anyway, this would be very hard, and very different from what
we have now. JPython is a "pure Java" application. I don't know
how to keep this when doing a merge/reqrite.

> > ....  Java
> > is explicit about what exceptions can be thrown where,
> > and not declaring the right "throws" list is a syntax
> > error.
> > ...
> > The only thing that could be done is to capture
> > continuations, store them in variables and call them
> > later. This still gives the stack sharing problems
> > which were quite hard to solve for Python.
> 
> I don't follow. Isn't it usual to use variables as continuations? I
> would expect:
> 
> interface continuation{
>         public Object apply( Object[] ) throws throwable;
> }

Sure. Does Java support function variables?
COntinuations must be callable objects, and I need to
be able to split them off of a running context at any
time. Is that possible without changing Java?

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com




More information about the Python-list mailing list