[Mono-dev] [PATCH] rootcontext

Raja R Harinath rharinath at novell.com
Wed Aug 1 06:16:09 EDT 2007


Hi,

Raja R Harinath <rharinath at novell.com> writes:

> "Jb Evain" <jb at nurv.fr> writes:
>
>> In /nostdlib mode, mcs loads predefined types, and validates that
>> System.Enum is a class instead of a ValueType. Attached is a patch to
>> fix that.
>>
>> -- 
>> Jb
>>
>> Index: rootcontext.cs
>> ===================================================================
>> --- rootcontext.cs	(revision 82492)
>> +++ rootcontext.cs	(working copy)
>> @@ -328,6 +328,7 @@
>>  				"System.Single",  "System.Double",
>>  				"System.Char",
>>  				"System.Decimal", "System.Void",
>> +				"System.Enum",
>>  				"System.RuntimeFieldHandle",
>>  				"System.RuntimeArgumentHandle",
>>  				"System.RuntimeTypeHandle",
>> @@ -345,7 +346,6 @@
>>  			// These are classes that depends on the core interfaces
>>  			//
>>  			string [] classes_second_stage = {
>> -				"System.Enum",
>>  				"System.String",
>>  				"System.Array",
>>  				"System.Reflection.MemberInfo",
>
> I don't remember if this went in, but I think it's reasonable.
>
> You probably need to move the loading of System.Enum to the first stage,
> if some real 'enum' became needed as part of the bootstrap.

Oops, I'm an idiot.  I misunderstood the patch.  It's wrong, since
System.Enum is a reference type.

Maybe it's better to move the loading of "System.Enum" closer to
InitEnumUnderlyingTypes(), though.

- Hari



More information about the Mono-devel-list mailing list