[Mono-list] IL code references to corlib and mscorlib

Jackson Harper jackson@latitudegeo.com
16 Jul 2003 07:55:44 -0700


Hello,

	Right now our il assembler simply treats corlib as an alias for
mscorlib. So if you use [corlib]System.Console::WriteLine () you are
really getting [mscorlib]System.Console::WriteLine (). MS .NET should
obviously have no problems with that, and I would guess that other
runtimes also map 'mscrolib' to the name of their corlib. 

	This could be considered a monodis bug though. We really shouldn't be
relying on aliases in the assembler because in theory people could
create their code with monodis and assemble it with someone elses
assembler. Would you mind filing a bug report?

Jackson



On Wed, 2003-07-16 at 03:57, Mark Easton wrote:
> I'm trying to understand how IL works and have come a cropper.
> 
> When I look at some IL code that was generated by mcs I can see that is
> references mscorlib for class declarations e.g. 
> 
>     .class private auto ansi beforefieldinit ComputerName extends
> [mscorlib]System.Object 
> 
> but that it then references corlib in the rest of the code e.g. 
> 
>     IL_0007: call void class [corlib]System.Console::WriteLine(string)
> 
> While I understand that the mono runtime must map mscorlib references to
> corlib, I have no idea how other runtimes, such as MS.NET or PNET, can
> deal with references to corlib?
> 
> Any help would be most appreciated as my head is really getting twisted
> into knots now - and my wife insists that's her job.
> 
> TIA
> 
> Mark
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list