[Mono-list] Microsoft's compiler with mono's corlib! - Issues!

Piers Haken piersh@friskit.com
Mon, 30 Dec 2002 15:36:45 -0800


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2B05C.50C885D6
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Yes, you're right: the corlib interfaces are standardized. However the
_internal_ interface between corlib and the runtime is not, and this is
where the incompatibility lies.

Corlib needs to do stuff that cannot be written in c#, eg.
creating/reflecting types, IO, threading, GC, etc... The functions for
doing these are native (C for mono, C++ for MS) functions exported by
the runtime. In mono they are referred to as 'icall's (see
mono/mono/metadata/icall.c) and they are runtime-specific.

I believe that the only Mono DLL that uses internal calls is corlib.dll.
However many of the Microsoft DLLs also use their own internal calls
exported from the MS runtime. This means that although, in theory and
for example, you can use Mono's System.XML.DLL on the MS runtime, you
cannot use MS's version on Mono.

Piers.

> -----Original Message-----
> From: bvv [mailto:bvvarma1@rediffmail.com]=20
> Sent: Monday, December 30, 2002 7:50 AM
> To: Piers Haken; mono-list@ximian.com
> Subject: Re: RE: [Mono-list] Microsoft's compiler with mono's=20
> corlib! - Issues!
>=20
>=20
> Hi Piers,
>=20
> Could you explain what this tight coupling is?
> I was thinking that since all mscorlib class interfaces are part=20
> of the ECMA standard it doesn't matter how you implement them as=20
> long as you provide all the necessary classes as per the spec. In=20
> which case i should ideally be able to mix & match the corlibs=20
> between different .Net runtimes.
>=20
> Correct me if i'm wrong please
>=20
> Thanks
>=20
> On Sun, 29 Dec 2002 Piers Haken wrote :
> > > -----Original Message-----
> > > From: bvv [mailto:bvvarma1@rediffmail.com]
> > > Sent: Saturday, December 28, 2002 6:41 AM
> > > To: mono-list@ximian.com
> > > Subject: [Mono-list] Microsoft's compiler with mono's
> >corlib!
> > > - Issues!
> > >
> > >
> > > Tried to compile and run a helloworld written in C# using the
> >MS
> > > compiler but mono's corlib.
> >
> >
> >You cannot do this. The corlibs and runtimes are very tightly
> >bound. You
> >cannot mix & match.
> >
> >Piers.
>=20
>=20
>=20

------_=_NextPart_001_01C2B05C.50C885D6
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.4417.0">
<TITLE>RE: RE: [Mono-list] Microsoft's compiler with mono's corlib! - =
Issues!</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Yes, you're right: the corlib interfaces are =
standardized. However the _internal_ interface between corlib and the =
runtime is not, and this is where the incompatibility lies.</FONT></P>

<P><FONT SIZE=3D2>Corlib needs to do stuff that cannot be written in c#, =
eg. creating/reflecting types, IO, threading, GC, etc... The functions =
for doing these are native (C for mono, C++ for MS) functions exported =
by the runtime. In mono they are referred to as 'icall's (see =
mono/mono/metadata/icall.c) and they are runtime-specific.</FONT></P>

<P><FONT SIZE=3D2>I believe that the only Mono DLL that uses internal =
calls is corlib.dll. However many of the Microsoft DLLs also use their =
own internal calls exported from the MS runtime. This means that =
although, in theory and for example, you can use Mono's System.XML.DLL =
on the MS runtime, you cannot use MS's version on Mono.</FONT></P>

<P><FONT SIZE=3D2>Piers.</FONT>
</P>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT>

<BR><FONT SIZE=3D2>&gt; From: bvv [<A =
HREF=3D"mailto:bvvarma1@rediffmail.com">mailto:bvvarma1@rediffmail.com</A=
>] </FONT>

<BR><FONT SIZE=3D2>&gt; Sent: Monday, December 30, 2002 7:50 AM</FONT>

<BR><FONT SIZE=3D2>&gt; To: Piers Haken; mono-list@ximian.com</FONT>

<BR><FONT SIZE=3D2>&gt; Subject: Re: RE: [Mono-list] Microsoft's =
compiler with mono's </FONT>

<BR><FONT SIZE=3D2>&gt; corlib! - Issues!</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Hi Piers,</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Could you explain what this tight coupling =
is?</FONT>

<BR><FONT SIZE=3D2>&gt; I was thinking that since all mscorlib class =
interfaces are part </FONT>

<BR><FONT SIZE=3D2>&gt; of the ECMA standard it doesn't matter how you =
implement them as </FONT>

<BR><FONT SIZE=3D2>&gt; long as you provide all the necessary classes as =
per the spec. In </FONT>

<BR><FONT SIZE=3D2>&gt; which case i should ideally be able to mix &amp; =
match the corlibs </FONT>

<BR><FONT SIZE=3D2>&gt; between different .Net runtimes.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Correct me if i'm wrong please</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; Thanks</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; On Sun, 29 Dec 2002 Piers Haken wrote :</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; -----Original Message-----</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; From: bvv [<A =
HREF=3D"mailto:bvvarma1@rediffmail.com">mailto:bvvarma1@rediffmail.com</A=
>]</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Sent: Saturday, December 28, 2002 6:41 =
AM</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; To: mono-list@ximian.com</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Subject: [Mono-list] Microsoft's =
compiler with mono's</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;corlib!</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; - Issues!</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; Tried to compile and run a helloworld =
written in C# using the</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;MS</FONT>

<BR><FONT SIZE=3D2>&gt; &gt; &gt; compiler but mono's corlib.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;You cannot do this. The corlibs and runtimes =
are very tightly</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;bound. You</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;cannot mix &amp; match.</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;</FONT>

<BR><FONT SIZE=3D2>&gt; &gt;Piers.</FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>

<BR><FONT SIZE=3D2>&gt; </FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2B05C.50C885D6--