A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-July/016495.html below:

[Python-Dev] Parrot -- should life imitate satire?

[Python-Dev] Parrot -- should life imitate satire?David Ascher DavidA@ActiveState.com
Tue, 31 Jul 2001 10:57:35 -0700
Skip Montanaro wrote:
> 
>     Guido> The PVM doesn't have a lot of knowledge about types built into
>     Guido> its instruction set....  The opcodes are mostly very abstract:
>     Guido> BINARY_ADD etc.
> 
> Yeah, but the runtime behind the virtual machine knows a hell of a lot about
> the types.  A stream of opcodes doesn't mean anything without the semantics
> of the functions the interpreter loop calls to do its work.  I thought the
> aim of Eric's Parrot idea was that Perl and Python might be able to share a
> virtual machine.  If both can generate something like today's BINARY_ADD
> opcode, the underlying types of both Python and Perl better have the same
> semantics.

I don't think that needs to be true _in toto_.  In other words, some
opcodes can be used by both languages, some can be language-specific. 
The implementation of the VM for a given opcode can be shared per
language, or even just partially shared.  BINARY_ADD can do the same
thing in most languages for 'native' types, and defer to per-language
codepaths for objects, for example.

One problem with a hybrid approach might be that optimizations become
really hard to do if you can't assume much about the semantics, or if
you can only assume the union of the various semantics.  But the idea is
intriguing anyway =).

--david



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4