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

Samuele Pedroni Samuele Pedroni <pedroni@inf.ethz.ch>
Wed, 1 Aug 2001 21:03:33 +0200 (MET DST)


Hi.

> 
> The point is to put the commonly called things in the vtable in a way that 
> you can avoid as much conditional code as possible, while less common 
> things get dealt with in ways you'd generally expect. (Dynamic lookups with 
> caching and suchlike things)

If I'm right, you're designing a object-based VM. I don't how
typical is OO programming in Perl, but in Python that plays a central role,
if your long run goal is to compile to native code you should have
a "hard-wired" concept of classes and them like, because an operation
like getting the class of an instance should be as direct and fast as possible
if you want to use any of the "nice" optimization for a VM for a OO dynamic
language:
  inline polymorphic caches
  customization
  or if/when possible: direct inlining.
  etc.
  
If any of the high-level OO system can not be used, you have to choose
a lower level one and map these to it, 
a vtable bytecode mapping model is too underspecified.

regards, Samuele Pedroni.