develooper Front page | perl.perl6.internals | Postings from October 2002

C# and Parrot

Thread Next
From:
Rhys Weatherley
Date:
October 17, 2002 19:32
Subject:
C# and Parrot
Message ID:
3DAF74B6.1B9A6B1@zip.com.au
Hi,

I'm Rhys Weatherley, the author of Portable.NET, which is part
of the DotGNU project.  (Put down that flame thrower!  I come
in peace. :-) )

DotGNU is currently reaching out to other projects in the OSS/FS
world to see how we can help you and how you might be able to
help us.  One of the projects that we are looking into is
compiling C# to Parrot bytecode, so that perhaps people in
the Parrot community may in turn be interested in helping us
complete our compiler and system library.

The Portable.NET C# compiler, cscc, is very extensive, and is
capable of generating output for multiple bytecode formats (IL
and JVM are currently supported, more or less).

I'm aware of Cola, but I know from bitter experience that the
hardest part of C# is parsing and semantic analysis, which
we've already got working.  So we may be able to help you on
that front.  We also have the beginnings of a C->bytecode
compiler.

So much for the high level stuff.  Getting technical ...

I'm a bit confused as to how one creates a user-defined class
in Parrot, and makes virtual method calls, accesses fields,
and what-not.  I can't seem to find a good example (Cola does
non-virtual methods only at present).

Is there a convention for which registers must be saved
across a call and which can be clobbered?  Using the
saveall/restoreall convention and passing all values on
the stack doesn't seem terribly efficient.  But maybe I'm
missing something?  Is the JIT smart enough to optimize
away unnecessary copies?

What is the size of the "int" type?  Will it always be 32 bit
or is it "whatever is best for the machine"?  And how do
I perform a "sign extend" operation?

Is there some means to store and access auxillary data in
a Parrot bytecode file?  I might need this to store metadata
for supporting C# reflection.

We in DotGNU should be able to bang out C#->Parrot fairly
quickly, if we can resolve the above issues.

Cheers,

Rhys.

http://www.southern-storm.com.au/portable_net.html
http://www.dotgnu.org/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About