You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.69
Former-commit-id: fc39669a0b707dd3c063977486506b6793da2890
This commit is contained in:
parent
d8f8abd549
commit
e2950ec768
@@ -4,6 +4,10 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Internal.Runtime.CompilerServices;
|
||||
|
||||
#region Place holder types for internal System.Private.CoreLib types
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
@@ -20,23 +24,135 @@ namespace System.Runtime.CompilerServices
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
|
||||
class TypeHandleFixupAttribute: Attribute
|
||||
{
|
||||
public TypeHandleFixupAttribute(int offset, Type fixupType)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
|
||||
class MethodAddrFixupAttribute: Attribute
|
||||
{
|
||||
public MethodAddrFixupAttribute(int offset, Type fixupType, string methodName)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace System.Runtime.InteropServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public sealed class NativeCallableAttribute : Attribute
|
||||
{
|
||||
public string EntryPoint;
|
||||
|
||||
public CallingConvention CallingConvention;
|
||||
|
||||
public NativeCallableAttribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
namespace System.Runtime.InteropServices
|
||||
{
|
||||
[AttributeUsage((System.AttributeTargets.Method | System.AttributeTargets.Class))]
|
||||
internal class McgIntrinsicsAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[McgIntrinsics]
|
||||
internal static class AddrofIntrinsics
|
||||
{
|
||||
// This method is implemented elsewhere in the toolchain
|
||||
internal static IntPtr AddrOf<T>(T ftn) { throw new PlatformNotSupportedException(); }
|
||||
}
|
||||
}
|
||||
|
||||
class Details
|
||||
{
|
||||
private static IntPtr PreInitializedField_DataBlob = IntPtr.Zero;
|
||||
private static IntPtr PreInitializedInt32Field_DataBlob;
|
||||
|
||||
[TypeHandleFixupAttribute(0, typeof(IntPtr))]
|
||||
private static IntPtr PreInitializedIntField_DataBlob;
|
||||
|
||||
#if BIT64
|
||||
[TypeHandleFixupAttribute(0, typeof(RuntimeTypeHandle))]
|
||||
[TypeHandleFixupAttribute(16, typeof(int))]
|
||||
[TypeHandleFixupAttribute(24, typeof(short))]
|
||||
[TypeHandleFixupAttribute(32, typeof(long))]
|
||||
[TypeHandleFixupAttribute(40, typeof(string))]
|
||||
#else
|
||||
[TypeHandleFixupAttribute(0, typeof(RuntimeTypeHandle))]
|
||||
[TypeHandleFixupAttribute(8, typeof(int))]
|
||||
[TypeHandleFixupAttribute(12, typeof(short))]
|
||||
[TypeHandleFixupAttribute(16, typeof(long))]
|
||||
[TypeHandleFixupAttribute(20, typeof(string))]
|
||||
#endif
|
||||
private static IntPtr PreInitializedTypeField_DataBlob;
|
||||
|
||||
#if BIT64
|
||||
[TypeHandleFixupAttribute(0, typeof(IntPtr))]
|
||||
[MethodAddrFixupAttribute(16, typeof(NativeMethods), "Func1")]
|
||||
[MethodAddrFixupAttribute(24, typeof(NativeMethods), "Func2")]
|
||||
#else
|
||||
[TypeHandleFixupAttribute(0, typeof(IntPtr))]
|
||||
[MethodAddrFixupAttribute(8, typeof(NativeMethods), "Func1")]
|
||||
[MethodAddrFixupAttribute(12, typeof(NativeMethods), "Func2")]
|
||||
#endif
|
||||
private static IntPtr PreInitializedMethodTypeField_DataBlob;
|
||||
}
|
||||
|
||||
static class NativeMethods
|
||||
{
|
||||
[NativeCallable]
|
||||
internal static void Func1(int a)
|
||||
{
|
||||
}
|
||||
|
||||
[NativeCallable]
|
||||
internal static void Func2(float b)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class PreInitData
|
||||
{
|
||||
internal static string StaticStringFieldBefore = "BEFORE";
|
||||
|
||||
//
|
||||
// Reference type fields
|
||||
//
|
||||
[PreInitialized]
|
||||
[InitDataBlob(typeof(Details), "PreInitializedIntField_DataBlob")]
|
||||
internal static int[] PreInitializedIntField;
|
||||
|
||||
[PreInitialized]
|
||||
[InitDataBlob(typeof(Details), "PreInitializedTypeField_DataBlob")]
|
||||
internal static RuntimeTypeHandle[] PreInitializedTypeField;
|
||||
|
||||
[PreInitialized]
|
||||
[InitDataBlob(typeof(Details), "PreInitializedMethodField_DataBlob")]
|
||||
internal static IntPtr[] PreInitializedMethodField;
|
||||
|
||||
//
|
||||
// Primitive type fields
|
||||
//
|
||||
[PreInitialized]
|
||||
[InitDataBlob(typeof(Details), "PreInitializedInt32Field_DataBlob")]
|
||||
internal static int PreInitializedInt32Field; // = 0x12345678
|
||||
|
||||
internal static string StaticStringFieldAfter = "AFTER";
|
||||
}
|
||||
|
||||
public class PreInitDataTest
|
||||
{
|
||||
static int[] StaticIntArrayField = new int[] { 5, 6, 7, 8 };
|
||||
|
||||
[System.Runtime.CompilerServices.PreInitialized]
|
||||
[System.Runtime.CompilerServices.InitDataBlob(typeof(Details), "PreInitializedField_DataBlob")]
|
||||
static int[] PreInitializedField = new int[] { 1, 2, 3, 4 };
|
||||
|
||||
static string StaticStringField = "ABCDE";
|
||||
|
||||
const int Pass = 100;
|
||||
const int Fail = -1;
|
||||
|
||||
@@ -44,12 +160,30 @@ public class PreInitDataTest
|
||||
{
|
||||
int result = Pass;
|
||||
|
||||
if (!TestPreInitData())
|
||||
if (!TestPreInitPrimitiveData())
|
||||
{
|
||||
Console.WriteLine("Failed");
|
||||
result = Fail;
|
||||
}
|
||||
|
||||
if (!TestPreInitIntData())
|
||||
{
|
||||
Console.WriteLine("Failed");
|
||||
result = Fail;
|
||||
}
|
||||
|
||||
if (!TestPreInitTypeData())
|
||||
{
|
||||
Console.WriteLine("Failed");
|
||||
result = Fail;
|
||||
}
|
||||
|
||||
if (!TestPreInitMethodData())
|
||||
{
|
||||
Console.WriteLine("Failed");
|
||||
result = Fail;
|
||||
}
|
||||
|
||||
// Make sure PreInitializedField works with other statics
|
||||
if (!TestOtherStatics())
|
||||
{
|
||||
@@ -60,30 +194,69 @@ public class PreInitDataTest
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool TestPreInitData()
|
||||
static bool TestPreInitPrimitiveData()
|
||||
{
|
||||
Console.WriteLine("Testing preinitialized array...");
|
||||
Console.WriteLine("Testing preinitialized primitive data...");
|
||||
|
||||
for (int i = 0; i < PreInitializedField.Length; ++i)
|
||||
if (PreInitData.PreInitializedInt32Field != 0x12345678)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool TestPreInitIntData()
|
||||
{
|
||||
Console.WriteLine("Testing preinitialized int array...");
|
||||
|
||||
for (int i = 0; i < PreInitData.PreInitializedIntField.Length; ++i)
|
||||
{
|
||||
if (PreInitializedField[i] != i + 1)
|
||||
if (PreInitData.PreInitializedIntField[i] != i + 1)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool TestPreInitTypeData()
|
||||
{
|
||||
Console.WriteLine("Testing preinitialized type array...");
|
||||
|
||||
if (!PreInitData.PreInitializedTypeField[0].Equals(typeof(int).TypeHandle))
|
||||
return false;
|
||||
if (!PreInitData.PreInitializedTypeField[1].Equals(typeof(short).TypeHandle))
|
||||
return false;
|
||||
if (!PreInitData.PreInitializedTypeField[2].Equals(typeof(long).TypeHandle))
|
||||
return false;
|
||||
if (!PreInitData.PreInitializedTypeField[3].Equals(typeof(string).TypeHandle))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public delegate void Func1Proc(int a);
|
||||
public delegate void Func2Proc(float a);
|
||||
|
||||
static bool TestPreInitMethodData()
|
||||
{
|
||||
Console.WriteLine("Testing preinitialized method array...");
|
||||
|
||||
if (PreInitData.PreInitializedMethodField[0] != System.Runtime.InteropServices.AddrofIntrinsics.AddrOf<Func1Proc>(NativeMethods.Func1))
|
||||
return false;
|
||||
|
||||
if (PreInitData.PreInitializedMethodField[1] != System.Runtime.InteropServices.AddrofIntrinsics.AddrOf<Func2Proc>(NativeMethods.Func2))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool TestOtherStatics()
|
||||
{
|
||||
Console.WriteLine("Testing other statics work well with preinitialized data in the same type...");
|
||||
|
||||
for (int i = 0; i < StaticIntArrayField.Length; ++i)
|
||||
{
|
||||
if (StaticIntArrayField[i] != i + 5)
|
||||
return false;
|
||||
}
|
||||
if (PreInitData.StaticStringFieldBefore != "BEFORE")
|
||||
return false;
|
||||
|
||||
if (StaticStringField != "ABCDE")
|
||||
if (PreInitData.StaticStringFieldAfter != "AFTER")
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,347 +0,0 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
// Metadata version: v4.0.30319
|
||||
.assembly extern mscorlib
|
||||
{
|
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
|
||||
.ver 4:0:0:0
|
||||
}
|
||||
.assembly PreInitData
|
||||
{
|
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
|
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
|
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
|
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment -------
|
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
|
||||
|
||||
.hash algorithm 0x00008004
|
||||
.ver 0:0:0:0
|
||||
}
|
||||
.module PreInitData.exe
|
||||
// MVID: {916169DC-051D-4529-A01D-E629C1FB5BFB}
|
||||
.imagebase 0x00400000
|
||||
.file alignment 0x00000200
|
||||
.stackreserve 0x00100000
|
||||
.subsystem 0x0003 // WINDOWS_CUI
|
||||
.corflags 0x00000001 // ILONLY
|
||||
// Image base: 0x001E0000
|
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION ===================
|
||||
|
||||
.class private auto ansi beforefieldinit Details
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.class explicit ansi sealed nested private '__PreInitData__Size=16'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 16
|
||||
} // end of class '__PreInitData__Size=16'
|
||||
|
||||
.field private static initonly valuetype Details/'__PreInitData__Size=16' PreInitializedField_DataBlob at I_00002A28
|
||||
.method public hidebysig specialname rtspecialname
|
||||
instance void .ctor() cil managed
|
||||
{
|
||||
// Code size 8 (0x8)
|
||||
.maxstack 8
|
||||
IL_0000: ldarg.0
|
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor()
|
||||
IL_0006: nop
|
||||
IL_0007: ret
|
||||
} // end of method Details::.ctor
|
||||
} // end of class Details
|
||||
|
||||
.class public auto ansi beforefieldinit PreInitDataTest
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.field private static int32[] StaticIntArrayField
|
||||
.field private static int32[] PreInitializedField
|
||||
.custom instance void System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 1C 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 46 69 65 6C 64 5F 44 // itializedField_D
|
||||
61 74 61 42 6C 6F 62 00 00 ) // ataBlob..
|
||||
.field private static string StaticStringField
|
||||
.field private static literal int32 Pass = int32(0x00000064)
|
||||
.field private static literal int32 Fail = int32(0xFFFFFFFF)
|
||||
.method public hidebysig static int32 Main(string[] args) cil managed
|
||||
{
|
||||
.entrypoint
|
||||
// Code size 64 (0x40)
|
||||
.maxstack 2
|
||||
.locals init (int32 V_0,
|
||||
bool V_1,
|
||||
bool V_2,
|
||||
int32 V_3)
|
||||
IL_0000: nop
|
||||
IL_0001: ldc.i4.s 100
|
||||
IL_0003: stloc.0
|
||||
IL_0004: call bool PreInitDataTest::TestPreInitData()
|
||||
IL_0009: ldc.i4.0
|
||||
IL_000a: ceq
|
||||
IL_000c: stloc.1
|
||||
IL_000d: ldloc.1
|
||||
IL_000e: brfalse.s IL_001f
|
||||
|
||||
IL_0010: nop
|
||||
IL_0011: ldstr "Failed"
|
||||
IL_0016: call void [mscorlib]System.Console::WriteLine(string)
|
||||
IL_001b: nop
|
||||
IL_001c: ldc.i4.m1
|
||||
IL_001d: stloc.0
|
||||
IL_001e: nop
|
||||
IL_001f: call bool PreInitDataTest::TestOtherStatics()
|
||||
IL_0024: ldc.i4.0
|
||||
IL_0025: ceq
|
||||
IL_0027: stloc.2
|
||||
IL_0028: ldloc.2
|
||||
IL_0029: brfalse.s IL_003a
|
||||
|
||||
IL_002b: nop
|
||||
IL_002c: ldstr "Failed"
|
||||
IL_0031: call void [mscorlib]System.Console::WriteLine(string)
|
||||
IL_0036: nop
|
||||
IL_0037: ldc.i4.m1
|
||||
IL_0038: stloc.0
|
||||
IL_0039: nop
|
||||
IL_003a: ldloc.0
|
||||
IL_003b: stloc.3
|
||||
IL_003c: br.s IL_003e
|
||||
|
||||
IL_003e: ldloc.3
|
||||
IL_003f: ret
|
||||
} // end of method PreInitDataTest::Main
|
||||
|
||||
.method private hidebysig static bool TestPreInitData() cil managed
|
||||
{
|
||||
// Code size 65 (0x41)
|
||||
.maxstack 3
|
||||
.locals init (int32 V_0,
|
||||
bool V_1,
|
||||
bool V_2,
|
||||
bool V_3)
|
||||
IL_0000: nop
|
||||
IL_0001: ldstr "Testing preinitialized array..."
|
||||
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
|
||||
IL_000b: nop
|
||||
IL_000c: ldc.i4.0
|
||||
IL_000d: stloc.0
|
||||
IL_000e: br.s IL_002d
|
||||
|
||||
IL_0010: nop
|
||||
IL_0011: ldsfld int32[] PreInitDataTest::PreInitializedField
|
||||
IL_0016: ldloc.0
|
||||
IL_0017: ldelem.i4
|
||||
IL_0018: ldloc.0
|
||||
IL_0019: ldc.i4.1
|
||||
IL_001a: add
|
||||
IL_001b: ceq
|
||||
IL_001d: ldc.i4.0
|
||||
IL_001e: ceq
|
||||
IL_0020: stloc.1
|
||||
IL_0021: ldloc.1
|
||||
IL_0022: brfalse.s IL_0028
|
||||
|
||||
IL_0024: ldc.i4.0
|
||||
IL_0025: stloc.2
|
||||
IL_0026: br.s IL_003f
|
||||
|
||||
IL_0028: nop
|
||||
IL_0029: ldloc.0
|
||||
IL_002a: ldc.i4.1
|
||||
IL_002b: add
|
||||
IL_002c: stloc.0
|
||||
IL_002d: ldloc.0
|
||||
IL_002e: ldsfld int32[] PreInitDataTest::PreInitializedField
|
||||
IL_0033: ldlen
|
||||
IL_0034: conv.i4
|
||||
IL_0035: clt
|
||||
IL_0037: stloc.3
|
||||
IL_0038: ldloc.3
|
||||
IL_0039: brtrue.s IL_0010
|
||||
|
||||
IL_003b: ldc.i4.1
|
||||
IL_003c: stloc.2
|
||||
IL_003d: br.s IL_003f
|
||||
|
||||
IL_003f: ldloc.2
|
||||
IL_0040: ret
|
||||
} // end of method PreInitDataTest::TestPreInitData
|
||||
|
||||
.method private hidebysig static bool TestOtherStatics() cil managed
|
||||
{
|
||||
// Code size 90 (0x5a)
|
||||
.maxstack 3
|
||||
.locals init (int32 V_0,
|
||||
bool V_1,
|
||||
bool V_2,
|
||||
bool V_3,
|
||||
bool V_4)
|
||||
IL_0000: nop
|
||||
IL_0001: ldstr "Testing other statics work well with preinitialize"
|
||||
+ "d data in the same type..."
|
||||
IL_0006: call void [mscorlib]System.Console::WriteLine(string)
|
||||
IL_000b: nop
|
||||
IL_000c: ldc.i4.0
|
||||
IL_000d: stloc.0
|
||||
IL_000e: br.s IL_002d
|
||||
|
||||
IL_0010: nop
|
||||
IL_0011: ldsfld int32[] PreInitDataTest::StaticIntArrayField
|
||||
IL_0016: ldloc.0
|
||||
IL_0017: ldelem.i4
|
||||
IL_0018: ldloc.0
|
||||
IL_0019: ldc.i4.5
|
||||
IL_001a: add
|
||||
IL_001b: ceq
|
||||
IL_001d: ldc.i4.0
|
||||
IL_001e: ceq
|
||||
IL_0020: stloc.1
|
||||
IL_0021: ldloc.1
|
||||
IL_0022: brfalse.s IL_0028
|
||||
|
||||
IL_0024: ldc.i4.0
|
||||
IL_0025: stloc.2
|
||||
IL_0026: br.s IL_0058
|
||||
|
||||
IL_0028: nop
|
||||
IL_0029: ldloc.0
|
||||
IL_002a: ldc.i4.1
|
||||
IL_002b: add
|
||||
IL_002c: stloc.0
|
||||
IL_002d: ldloc.0
|
||||
IL_002e: ldsfld int32[] PreInitDataTest::StaticIntArrayField
|
||||
IL_0033: ldlen
|
||||
IL_0034: conv.i4
|
||||
IL_0035: clt
|
||||
IL_0037: stloc.3
|
||||
IL_0038: ldloc.3
|
||||
IL_0039: brtrue.s IL_0010
|
||||
|
||||
IL_003b: ldsfld string PreInitDataTest::StaticStringField
|
||||
IL_0040: ldstr "ABCDE"
|
||||
IL_0045: call bool [mscorlib]System.String::op_Inequality(string,
|
||||
string)
|
||||
IL_004a: stloc.s V_4
|
||||
IL_004c: ldloc.s V_4
|
||||
IL_004e: brfalse.s IL_0054
|
||||
|
||||
IL_0050: ldc.i4.0
|
||||
IL_0051: stloc.2
|
||||
IL_0052: br.s IL_0058
|
||||
|
||||
IL_0054: ldc.i4.1
|
||||
IL_0055: stloc.2
|
||||
IL_0056: br.s IL_0058
|
||||
|
||||
IL_0058: ldloc.2
|
||||
IL_0059: ret
|
||||
} // end of method PreInitDataTest::TestOtherStatics
|
||||
|
||||
.method public hidebysig specialname rtspecialname
|
||||
instance void .ctor() cil managed
|
||||
{
|
||||
// Code size 8 (0x8)
|
||||
.maxstack 8
|
||||
IL_0000: ldarg.0
|
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor()
|
||||
IL_0006: nop
|
||||
IL_0007: ret
|
||||
} // end of method PreInitDataTest::.ctor
|
||||
|
||||
.method private hidebysig specialname rtspecialname static
|
||||
void .cctor() cil managed
|
||||
{
|
||||
// Code size 55 (0x37)
|
||||
.maxstack 8
|
||||
IL_0000: ldc.i4.4
|
||||
IL_0001: newarr [mscorlib]System.Int32
|
||||
IL_0006: dup
|
||||
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=16' '<PrivateImplementationDetails>'::AB434F2ED820934995191E4C1A3C24AB41FF2E2C
|
||||
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
|
||||
valuetype [mscorlib]System.RuntimeFieldHandle)
|
||||
IL_0011: stsfld int32[] PreInitDataTest::StaticIntArrayField
|
||||
/*
|
||||
IL_0016: ldc.i4.4
|
||||
IL_0017: newarr [mscorlib]System.Int32
|
||||
IL_001c: dup
|
||||
IL_001d: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=16' '<PrivateImplementationDetails>'::'1456763F890A84558F99AFA687C36B9037697848'
|
||||
IL_0022: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
|
||||
valuetype [mscorlib]System.RuntimeFieldHandle)
|
||||
IL_0027: stsfld int32[] PreInitDataTest::PreInitializedField
|
||||
*/
|
||||
IL_002c: ldstr "ABCDE"
|
||||
IL_0031: stsfld string PreInitDataTest::StaticStringField
|
||||
IL_0036: ret
|
||||
} // end of method PreInitDataTest::.cctor
|
||||
|
||||
} // end of class PreInitDataTest
|
||||
|
||||
.class private auto ansi beforefieldinit System.Runtime.CompilerServices.PreInitializedAttribute
|
||||
extends [mscorlib]System.Attribute
|
||||
{
|
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
|
||||
4D 75 6C 74 69 70 6C 65 00 ) // Multiple.
|
||||
.method public hidebysig specialname rtspecialname
|
||||
instance void .ctor() cil managed
|
||||
{
|
||||
// Code size 8 (0x8)
|
||||
.maxstack 8
|
||||
IL_0000: ldarg.0
|
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
|
||||
IL_0006: nop
|
||||
IL_0007: ret
|
||||
} // end of method PreInitializedAttribute::.ctor
|
||||
|
||||
} // end of class System.Runtime.CompilerServices.PreInitializedAttribute
|
||||
|
||||
.class private auto ansi beforefieldinit System.Runtime.CompilerServices.InitDataBlobAttribute
|
||||
extends [mscorlib]System.Attribute
|
||||
{
|
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 01 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
|
||||
4D 75 6C 74 69 70 6C 65 00 ) // Multiple.
|
||||
.method public hidebysig specialname rtspecialname
|
||||
instance void .ctor(class [mscorlib]System.Type 'type',
|
||||
string fieldName) cil managed
|
||||
{
|
||||
// Code size 9 (0x9)
|
||||
.maxstack 8
|
||||
IL_0000: ldarg.0
|
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
|
||||
IL_0006: nop
|
||||
IL_0007: nop
|
||||
IL_0008: ret
|
||||
} // end of method InitDataBlobAttribute::.ctor
|
||||
|
||||
} // end of class System.Runtime.CompilerServices.InitDataBlobAttribute
|
||||
|
||||
.class private auto ansi sealed '<PrivateImplementationDetails>'
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=16'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 16
|
||||
} // end of class '__StaticArrayInitTypeSize=16'
|
||||
|
||||
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=16' AB434F2ED820934995191E4C1A3C24AB41FF2E2C at I_00002A38
|
||||
} // end of class '<PrivateImplementationDetails>'
|
||||
|
||||
|
||||
// =============================================================
|
||||
|
||||
.data cil I_00002A28 = bytearray (
|
||||
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00)
|
||||
.data cil I_00002A38 = bytearray (
|
||||
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00)
|
||||
// *********** DISASSEMBLY COMPLETE ***********************
|
||||
// WARNING: Created Win32 resource file PreInitData.res
|
||||
@@ -1,6 +1,13 @@
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Compile Include="*.il" />
|
||||
<Compile Include="PreInitDataTest.il" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Platform)'=='x64' or '$(Platform)'=='arm64'">
|
||||
<Compile Include="PreInitData64.il" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(Platform)'=='x86' or '$(Platform)'=='arm'">
|
||||
<Compile Include="PreInitData32.il" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), SimpleTest.targets))\SimpleTest.targets" />
|
||||
|
||||
194
external/corert/tests/src/Simple/PreInitData/PreInitData32.il
vendored
Normal file
194
external/corert/tests/src/Simple/PreInitData/PreInitData32.il
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
// =============================================================
|
||||
// PreInitialized data
|
||||
// =============================================================
|
||||
|
||||
.class private auto ansi beforefieldinit Details
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticDataSize=4' PreInitializedInt32Field_DataBlob at Data_Int32
|
||||
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' PreInitializedField_DataBlob at Data_IntArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 ) // 9..
|
||||
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' PreInitializedTypeField_DataBlob at Data_TypeArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 14 00 00 00 5A 53 79 73 74 65 6D 2E 53 74 // ......ZSystem.St
|
||||
72 69 6E 67 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // ring, mscorlib,
|
||||
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
|
||||
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
|
||||
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
|
||||
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
|
||||
39 00 00 ) // 9..
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 10 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 36 34 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t64, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 0C 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 31 36 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t16, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 08 00 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 6B 53 79 73 74 65 6D 2E 52 75 // ......kSystem.Ru
|
||||
6E 74 69 6D 65 54 79 70 65 48 61 6E 64 6C 65 2C // ntimeTypeHandle,
|
||||
20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2C // System.Runtime,
|
||||
20 56 65 72 73 69 6F 6E 3D 34 2E 32 2E 30 2E 30 // Version=4.2.0.0
|
||||
2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 // , Culture=neutra
|
||||
6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 // l, PublicKeyToke
|
||||
6E 3D 62 30 33 66 35 66 37 66 31 31 64 35 30 61 // n=b03f5f7f11d50a
|
||||
33 61 00 00 ) // 3a..
|
||||
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=16' PreInitializedMethodField_DataBlob at Data_MethodArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 5A 53 79 73 74 65 6D 2E 49 6E // ......ZSystem.In
|
||||
74 50 74 72 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // tPtr, mscorlib,
|
||||
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
|
||||
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
|
||||
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
|
||||
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
|
||||
39 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.MethodAddrFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type,
|
||||
string) = ( 01 00 08 00 00 00 0D 4E 61 74 69 76 65 4D 65 74 // .......NativeMet
|
||||
68 6F 64 73 05 46 75 6E 63 31 00 00 ) // hods.Func1..
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.MethodAddrFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type,
|
||||
string) = ( 01 00 0C 00 00 00 0D 4E 61 74 69 76 65 4D 65 74 // .......NativeMet
|
||||
68 6F 64 73 05 46 75 6E 63 32 00 00 ) // hods.Func2..
|
||||
} // end of class Details
|
||||
|
||||
.class public auto ansi beforefieldinit PreInitData
|
||||
{
|
||||
.field private static string StaticStringFieldBefore
|
||||
|
||||
//===================================================================
|
||||
// preinitialized fields
|
||||
.field private static int32[] PreInitializedIntField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 1C 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 46 69 65 6C 64 5F 44 // itializedField_D
|
||||
61 74 61 42 6C 6F 62 00 00 ) // ataBlob..
|
||||
|
||||
.field private static class [System.Private.CoreLib]Internal.Runtime.CompilerServices.FixupRuntimeTypeHandle[] PreInitializedTypeField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 20 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 54 79 70 65 46 69 65 // itializedTypeFie
|
||||
6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // ld_DataBlob..
|
||||
|
||||
.field static assembly native int[] PreInitializedMethodField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 22 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 4D 65 74 68 6F 64 46 // itializedMethodF
|
||||
69 65 6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // ield_DataBlob..
|
||||
|
||||
.field static assembly int32 PreInitializedInt32Field
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 21 50 72 65 49 6E // ...Details!PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 49 6E 74 33 32 46 69 // itializedInt32Fi
|
||||
65 6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // eld_DataBlob..
|
||||
|
||||
//===================================================================
|
||||
|
||||
.field private static string StaticStringFieldAfter
|
||||
|
||||
.method private hidebysig specialname rtspecialname static
|
||||
void .cctor() cil managed
|
||||
{
|
||||
// Code size 21 (0x15)
|
||||
.maxstack 8
|
||||
IL_0000: ldstr "BEFORE"
|
||||
IL_0005: stsfld string PreInitData::StaticStringFieldBefore
|
||||
IL_000a: ldstr "AFTER"
|
||||
IL_000f: stsfld string PreInitData::StaticStringFieldAfter
|
||||
IL_0014: ret
|
||||
} // end of method PreInitData::.cctor
|
||||
} // end of class PreInitData
|
||||
|
||||
.class private auto ansi '<PrivateImplementationDetails>'
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.class explicit ansi sealed nested private '__StaticDataSize=4'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 4
|
||||
} // end of class '__StaticDataSize=4'
|
||||
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=24'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 24
|
||||
} // end of class '__StaticArrayInitTypeSize=24'
|
||||
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=16'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 16
|
||||
} // end of class '__StaticArrayInitTypeSize=16'
|
||||
} // end of class '<PrivateImplementationDetails>'
|
||||
|
||||
.class private abstract auto ansi sealed beforefieldinit NativeMethods
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.method assembly hidebysig static void
|
||||
Func1(int32 a) cil managed
|
||||
{
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.InteropServices.NativeCallableAttribute::.ctor() = ( 01 00 00 00 )
|
||||
// Code size 2 (0x2)
|
||||
.maxstack 8
|
||||
IL_0000: nop
|
||||
IL_0001: ret
|
||||
} // end of method NativeMethods::Func1
|
||||
|
||||
.method assembly hidebysig static void
|
||||
Func2(float32 b) cil managed
|
||||
{
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.InteropServices.NativeCallableAttribute::.ctor() = ( 01 00 00 00 )
|
||||
// Code size 2 (0x2)
|
||||
.maxstack 8
|
||||
IL_0000: nop
|
||||
IL_0001: ret
|
||||
} // end of method NativeMethods::Func2
|
||||
|
||||
} // end of class NativeMethods
|
||||
|
||||
// =============================================================
|
||||
// Data blob
|
||||
// =============================================================
|
||||
|
||||
.data cil Data_IntArray = bytearray ( 00 00 00 00 04 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00)
|
||||
.data cil Data_TypeArray = bytearray ( 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
|
||||
.data cil Data_MethodArray = bytearray ( 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 )
|
||||
.data cil Data_Int32 = bytearray ( 78 56 34 12 )
|
||||
|
||||
192
external/corert/tests/src/Simple/PreInitData/PreInitData64.il
vendored
Normal file
192
external/corert/tests/src/Simple/PreInitData/PreInitData64.il
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
// =============================================================
|
||||
// PreInitialized data
|
||||
// =============================================================
|
||||
|
||||
.class private auto ansi beforefieldinit Details
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticDataSize=4' PreInitializedInt32Field_DataBlob at Data_Int32
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=32' PreInitializedField_DataBlob at Data_IntArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 ) // 9..
|
||||
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=48' PreInitializedTypeField_DataBlob at Data_TypeArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 28 00 00 00 5A 53 79 73 74 65 6D 2E 53 74 // ......ZSystem.St
|
||||
72 69 6E 67 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // ring, mscorlib,
|
||||
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
|
||||
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
|
||||
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
|
||||
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
|
||||
39 00 00 ) // 9..
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 20 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 36 34 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t64, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 18 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 31 36 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t16, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 10 00 00 00 59 53 79 73 74 65 6D 2E 49 6E // ......YSystem.In
|
||||
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
|
||||
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
|
||||
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
|
||||
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
|
||||
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
|
||||
00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 6B 53 79 73 74 65 6D 2E 52 75 // ......kSystem.Ru
|
||||
6E 74 69 6D 65 54 79 70 65 48 61 6E 64 6C 65 2C // ntimeTypeHandle,
|
||||
20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2C // System.Runtime,
|
||||
20 56 65 72 73 69 6F 6E 3D 34 2E 32 2E 30 2E 30 // Version=4.2.0.0
|
||||
2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 // , Culture=neutra
|
||||
6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 // l, PublicKeyToke
|
||||
6E 3D 62 30 33 66 35 66 37 66 31 31 64 35 30 61 // n=b03f5f7f11d50a
|
||||
33 61 00 00 ) // 3a..
|
||||
|
||||
.field private static valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=32' PreInitializedMethodField_DataBlob at Data_MethodArray
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.TypeHandleFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type) = ( 01 00 00 00 00 00 5A 53 79 73 74 65 6D 2E 49 6E // ......ZSystem.In
|
||||
74 50 74 72 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // tPtr, mscorlib,
|
||||
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
|
||||
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
|
||||
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
|
||||
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
|
||||
39 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.MethodAddrFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type,
|
||||
string) = ( 01 00 10 00 00 00 0D 4E 61 74 69 76 65 4D 65 74 // .......NativeMet
|
||||
68 6F 64 73 05 46 75 6E 63 31 00 00 ) // hods.Func1..
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.MethodAddrFixupAttribute::.ctor(int32,
|
||||
class [mscorlib]System.Type,
|
||||
string) = ( 01 00 18 00 00 00 0D 4E 61 74 69 76 65 4D 65 74 // .......NativeMet
|
||||
68 6F 64 73 05 46 75 6E 63 32 00 00 ) // hods.Func2..
|
||||
} // end of class Details
|
||||
|
||||
.class public auto ansi beforefieldinit PreInitData
|
||||
{
|
||||
.field private static string StaticStringFieldBefore
|
||||
|
||||
//===================================================================
|
||||
// preinitialized fields
|
||||
.field private static int32[] PreInitializedIntField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 1C 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 46 69 65 6C 64 5F 44 // itializedField_D
|
||||
61 74 61 42 6C 6F 62 00 00 ) // ataBlob..
|
||||
|
||||
.field private static class [System.Private.CoreLib]Internal.Runtime.CompilerServices.FixupRuntimeTypeHandle[] PreInitializedTypeField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 20 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 54 79 70 65 46 69 65 // itializedTypeFie
|
||||
6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // ld_DataBlob..
|
||||
|
||||
.field static assembly native int[] PreInitializedMethodField
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 22 50 72 65 49 6E // ...Details.PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 4D 65 74 68 6F 64 46 // itializedMethodF
|
||||
69 65 6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // ield_DataBlob..
|
||||
|
||||
.field static assembly int32 PreInitializedInt32Field
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.PreInitializedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.InitDataBlobAttribute::.ctor(class [mscorlib]System.Type,
|
||||
string) = ( 01 00 07 44 65 74 61 69 6C 73 21 50 72 65 49 6E // ...Details!PreIn
|
||||
69 74 69 61 6C 69 7A 65 64 49 6E 74 33 32 46 69 // itializedInt32Fi
|
||||
65 6C 64 5F 44 61 74 61 42 6C 6F 62 00 00 ) // eld_DataBlob..
|
||||
|
||||
//===================================================================
|
||||
|
||||
.field private static string StaticStringFieldAfter
|
||||
|
||||
.method private hidebysig specialname rtspecialname static
|
||||
void .cctor() cil managed
|
||||
{
|
||||
// Code size 21 (0x15)
|
||||
.maxstack 8
|
||||
IL_0000: ldstr "BEFORE"
|
||||
IL_0005: stsfld string PreInitData::StaticStringFieldBefore
|
||||
IL_000a: ldstr "AFTER"
|
||||
IL_000f: stsfld string PreInitData::StaticStringFieldAfter
|
||||
IL_0014: ret
|
||||
} // end of method PreInitData::.cctor
|
||||
} // end of class PreInitData
|
||||
|
||||
.class private auto ansi '<PrivateImplementationDetails>'
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
|
||||
.class explicit ansi sealed nested private '__StaticDataSize=4'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 4
|
||||
} // end of class '__StaticDataSize=4'
|
||||
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=32'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 32
|
||||
} // end of class '__StaticArrayInitTypeSize=32'
|
||||
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=48'
|
||||
extends [mscorlib]System.ValueType
|
||||
{
|
||||
.pack 1
|
||||
.size 48
|
||||
} // end of class '__StaticArrayInitTypeSize=16'
|
||||
} // end of class '<PrivateImplementationDetails>'
|
||||
|
||||
.class private abstract auto ansi sealed beforefieldinit NativeMethods
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.method assembly hidebysig static void
|
||||
Func1(int32 a) cil managed
|
||||
{
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.InteropServices.NativeCallableAttribute::.ctor() = ( 01 00 00 00 )
|
||||
// Code size 2 (0x2)
|
||||
.maxstack 8
|
||||
IL_0000: nop
|
||||
IL_0001: ret
|
||||
} // end of method NativeMethods::Func1
|
||||
|
||||
.method assembly hidebysig static void
|
||||
Func2(float32 b) cil managed
|
||||
{
|
||||
.custom instance void [System.Private.CoreLib]System.Runtime.InteropServices.NativeCallableAttribute::.ctor() = ( 01 00 00 00 )
|
||||
// Code size 2 (0x2)
|
||||
.maxstack 8
|
||||
IL_0000: nop
|
||||
IL_0001: ret
|
||||
} // end of method NativeMethods::Func2
|
||||
|
||||
} // end of class NativeMethods
|
||||
|
||||
// =============================================================
|
||||
// Data blob
|
||||
// =============================================================
|
||||
|
||||
.data cil Data_IntArray = bytearray ( 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00)
|
||||
.data cil Data_TypeArray = bytearray ( 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
|
||||
.data cil Data_MethodArray = bytearray ( 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
|
||||
.data cil Data_Int32 = bytearray ( 78 56 34 12 )
|
||||
508
external/corert/tests/src/Simple/PreInitData/PreInitDataTest.il
vendored
Normal file
508
external/corert/tests/src/Simple/PreInitData/PreInitDataTest.il
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user