Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hi - Regarding JVM - parrot compatibility

0 views
Skip to first unread message

Karthik Kumar

unread,
Oct 14, 2002, 6:37:43 AM10/14/02
to perl6-i...@perl.org
Hi All,
I am new to this parrot virtual machine aimed as a common denominator for
perl and python. I had been going thru this list for some time.
I would like to contribute to the parrot community.
My interest here is - I am intereseted in writing a .class file --> .parrot
bytecode and viceversa. In other words planning to bring in the jvm
compatibility suite to parrot.
Can you please let me know if any work going on relative to this or any src
code tree that you would me to look into.

Thanks in advance for letting me know this info.

Good luck.

Cheers.
Karthik.

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

Leon Brocard

unread,
Oct 14, 2002, 7:08:22 AM10/14/02
to akk...@users.sourceforge.net, perl6-i...@perl.org
Karthik Kumar sent the following bits through the ether:

> Can you please let me know if any work going on relative to this or
> any src code tree that you would me to look into.

Hiya. I've have worked on the past on trying to get JVM bytecodes
working inside Parrot, but mostly that hasn't got very far due to lack
of free time or motivation.

It's very easy to get simple stuff working due to the low number of
JVM bytecodes. You can emulate iinc quite easily ;-) However, it's
getting the classes and object system to work which is a little
harder.

This may help: http://search.cpan.org/dist/Java-JVM-Classfile/

In the past couple of weeks I've been wondering whether a hybrid
scheme a la Inline::Java where we dispatch stuff to a real JVM may be
a faster approach to get running.

Why, what exactly did you have in mind?

Leon
--
Leon Brocard.............................http://www.astray.com/
scribot.................................http://www.scribot.com/

.... Holy Smoke Batman, it's the Joker!

Ramesh Ananthakrishnan

unread,
Oct 14, 2002, 9:33:47 AM10/14/02
to akk...@users.sourceforge.net, parrot
well,
that part exists. a proof of concept parrot to jvm
translator stuff has already been done. As for full
implementation well parrot's still er... changing.
It's still being developed and so keeps changing
pretty fast. I wouldn't go to translation at this time
as it may be pretty hard to hit the forever changing
target that's parrot now.
I'm working on poring C to parrot. So that you can
compile C programs into parrot assembly and have them
work right off the bat. Once we get C across, it would
b e pretty easy to port other languages and libraries
to Parrot like Perl5.6, Ruby all of which have been
built using standard C tools. (or so I hope ;-)).
Anyway if you are intrested in it send me a line.
Hey Hey.... wait a minute. There's this flashing big
light bulb. Big idea coming up! O.K. This may be
exceedingly stupid, but why not an assembly back to
Parrot compiler. Howzaat. We wouldn't actually have to
port C just the assembly stuff and voila' it just
works.

cheers,
Ramesh

Karthik Kumar

unread,
Oct 15, 2002, 12:54:40 AM10/15/02
to Leon Brocard, perl6-i...@perl.org
Hi Leon,

--- Leon Brocard <ac...@astray.com> wrote:
> Karthik Kumar sent the following bits through the ether:
>
> > Can you please let me know if any work going on relative to this or
> > any src code tree that you would me to look into.
>
> Hiya. I've have worked on the past on trying to get JVM bytecodes
> working inside Parrot, but mostly that hasn't got very far due to lack
> of free time or motivation.
>
> It's very easy to get simple stuff working due to the low number of
> JVM bytecodes. You can emulate iinc quite easily ;-) However, it's
> getting the classes and object system to work which is a little
> harder.

IINC simulation is quite simple as you had mentioned.
The simulation of the following:

new
anew
getfield
putfield
getstatic
putstatic
invokevirtual invokespecial invokeinterface invokeinterface

all deal with objects and they are not pretty straight-forward as you had
mentioned.

Cool. I saw that. That one seems cool. Good job !!

>
> In the past couple of weeks I've been wondering whether a hybrid
> scheme a la Inline::Java where we dispatch stuff to a real JVM may be
> a faster approach to get running.
>
> Why, what exactly did you have in mind?

Well. What I had in mind is something like this -

You write a java .class library , say some arithmetic.
Then you write another language compatible with Parrot JVM , may be Perl6.

Then from ther perl6 code you call that arithmetic lib. function.
The parrotVM is smart enough to convert .class files to parrotVM compatible
code and start using the same.

( arithmetic lib. is just a simple example i could think of ) .

This is my brief idea.

But as Ramesh was mentioning parrotVM is still under dev. So my q is - how far
is object support possible in parrotVM. Does that need to be simulated or
parrotVM is designed to be based on ooops.

Any pointers on the same.

Ramesh Ananthakrishnan

unread,
Oct 15, 2002, 4:24:10 AM10/15/02
to Karthik Kumar, parrot
afaik at byte level the stuff is supposed to be freely
and completely interchangeable. Let's say you got
things from Perl->Parrot. it should be delectably
simple to go from Parrot->Perl.

so this wouldn't be a problem with Java bytecode.
Perhaps you may have to specify to the compiler to
compile down to Parrot target code. Or would it be
simpler to just convert Java binary to Parrot
binary????

cheers,
Ramesh

0 new messages