Collin Winter wrote:
> Hey MA,
> 
> On Mon, Feb 1, 2010 at 9:58 AM, M.-A. Lemburg <m...@egenix.com> wrote:
>> BTW: Some years ago we discussed the idea of pluggable VMs for
>> Python. Wouldn't U-S be a good motivation to revisit this idea ?
>>
>> We could then have a VM based on byte code using a stack
>> machines, one based on word code using a register machine
>> and perhaps one that uses the Stackless approach.
> 
> What is the usecase for having pluggable VMs? Is the idea that, at
> runtime, the user would select which virtual machine they want to run
> their code under? How would the user make that determination
> intelligently?

The idea back then (IIRC) was to have a compile time option to select
one of a few available VMs, in order to more easily experiment with
new or optimized implementations such as e.g. a register based VM.

It should even be possible to factor out the VM into a DLL/SO which
is then selected and loaded via a command line option.

> I think this idea underestimates a) how deeply the current CPython VM
> is intertwined with the rest of the implementation, and b) the nature
> of the changes required by these separate VMs. For example, Unladen
> Swallow adds fields to the C-level structs for dicts, code objects and
> frame objects; how would those changes be pluggable? Stackless
> requires so many modifications that it is effectively a fork; how
> would those changes be pluggable?

They wouldn't be pluggable. Such changes would have to be made
in a more general way in order to serve more than just one VM.

Getting the right would certainly require a major effort, but it
would also reduce the need to have several branches of C-based
Python implementations.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Feb 01 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to