[Mono-dev] Strange enum issue

Robert Jordan robertj at gmx.net
Tue Mar 10 19:01:19 UTC 2015


There was a recent commit which added MS' reference source Enum
support to Mono:

https://github.com/mono/mono/commit/65dba595eaea2c871d1f72fbdc04f6440350af96

Maybe it's an endian-related issue.

Robert

On 10.03.2015 18:41, Neale Ferguson wrote:
> I really need some advice or direction on this…
>
> If I make the following change to external/ikvm/reflect/Projection.cs:
>
> --- a/reflect/Projection.cs
> +++ b/reflect/Projection.cs
> @@ -71,11 +71,17 @@ namespace IKVM.Reflection
>
>                  static WindowsRuntimeProjection()
>                  {
> +Console.Error.WriteLine("WindowsRuntimeProjection - {0} {1} {2}",
> +ProjectionAssembly.System_Runtime,
> +ProjectionAssembly.System_Runtime_InteropServices_WindowsRuntime,
> +ProjectionAssembly.Count);
>
> and build and use it on x86_64 it will output:
>
> WindowsRuntimeProjection - System_Runtime
> System_Runtime_InteropServices_WindowsRuntime Count
>
> However, on s390x it outputs:
>
> WindowsRuntimeProjection - System_Runtime 1 5
>
> I'm trying to work out why there is this difference and whether it is
> responsible for a crash later during the build process.
>
> The enum looks like:
>
>                  enum ProjectionAssembly
>                  {
>                          System_Runtime,
>                          System_Runtime_InteropServices_WindowsRuntime,
>                          System_ObjectModel,
>                          System_Runtime_WindowsRuntime,
>                          System_Runtime_WindowsRuntime_UI_Xaml,
>
>                          Count
>                  }
>
> If I play around with the order of entries, only the one listed first gets
> printed as the enum name and the others get the integer value.
>
>
> Neale
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list