Re: Prothon IS different inside

Jonathan Gardner <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
On Saturday 10 July 2004 01:50 pm, Mark Hahn wrote:
> Paul Prescod wrote:
> > Python's interpreter is totally object oriented.
>
> Then it must only be Parrot.  I shouldn't have included Python in that
> tirade.  I made an incorrect leap in conclusions.  So Python and Prothon
> are in the same boat when it comes to porting to Parrot.
>
> Parrot has four sets of registers.  Only one of the four holds objects.
> About three fourths of Parrot would be wasted when running Python or
> Prothon.
>

I've been thinking about this and I think that while at first we may not use 
much of the other three other registers, over time optimizations will begin 
to use them.

Take for instance Int.add_(). This is implemented in C right now. You have 
three options if you decide to port to Parrot:

(1) Keep it in C in a Parrot extension module.

(2) Keep it in Parrot Bytecode in a Parrot extension module. (Think Pyrex.) 
This will use the other three registers heavily.

(3) Compile calls to Int.add_() into Parrot Bytecode (basically, inlining 
(2) above). (Think Psyco.)

Perhaps most of the user written code will be compiled into bytecodes that 
use the P registers principally, but all the underlying code will be 
compiled such that it can make heavy use of the other three registers, or 
it will be written in C, or a combination of the two.

So I wouldn't worry about this yet as it isn't an issue.

-- 
Jonathan Gardner
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.