diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 13:11:59 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2015-06-10 21:31:41 -0700 |
commit | 937180e726dd08c84852a835bd711157769aed2b (patch) | |
tree | 8b9c350368cb9f2c57c2fea77d4cc90b51a80dd2 /tests/src/JIT/Generics | |
parent | c65178cbb205f8573c84791a31836fb3a7dd237e (diff) | |
download | coreclr-937180e726dd08c84852a835bd711157769aed2b.tar.gz coreclr-937180e726dd08c84852a835bd711157769aed2b.tar.bz2 coreclr-937180e726dd08c84852a835bd711157769aed2b.zip |
Import the first batch of IL tests.
This set of tests is comprised of IL tests that:
- only reference APIs in .Net Core's System.Runtime,
System.Runtime.Extensions, and System.Threading contracts
- compile to a single executable,
- and expect no command line arguments at runtime.
Diffstat (limited to 'tests/src/JIT/Generics')
10 files changed, 1265 insertions, 0 deletions
diff --git a/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.ilproj b/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.ilproj new file mode 100644 index 0000000000..c641f8da8a --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.ilproj @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + </PropertyGroup> + <Target Name="Build"> + <ItemGroup> + <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.il" /> + </ItemGroup> + <PropertyGroup> + <GenerateRunScript>false</GenerateRunScript> + </PropertyGroup> + <MSBuild Projects="il_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" /> + </Target> +</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Generics/ConstrainedCall/il_template.proj b/tests/src/JIT/Generics/ConstrainedCall/il_template.proj new file mode 100644 index 0000000000..cd6913e79e --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/il_template.proj @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(AssemblyName1)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <RestorePackages>true</RestorePackages> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + <ProjectLanguage>IL</ProjectLanguage> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <ItemGroup> + <Compile Include="$(AssemblyName1).il" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt1.il b/tests/src/JIT/Generics/ConstrainedCall/vt1.il new file mode 100644 index 0000000000..149938c7a3 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt1.il @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// valuetype - implemented methods +// ldflda, ldelema, ldarga +// Increment: constrained, Decrement: box + +.assembly extern mscorlib {} +.assembly vt1 {} +.class interface private abstract auto ansi IncrDecr +{ + .method public hidebysig newslot abstract virtual + instance void Incr(int32 a) cil managed + { + } // end of method IncrDecr::Incr + + .method public hidebysig newslot abstract virtual + instance void Decr(int32 a) cil managed + { + } // end of method IncrDecr::Decr + + .method public hidebysig newslot abstract virtual + instance int32 Val() cil managed + { + } // end of method IncrDecr::Val + +} // end of class IncrDecr + +.class private sequential ansi sealed beforefieldinit MyInt + extends [mscorlib]System.ValueType + implements IncrDecr +{ + .field private int32 x + .method public hidebysig newslot virtual final + instance void Incr(int32 a) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: dup + IL_0002: ldfld int32 MyInt::x + IL_0007: ldarg.1 + IL_0008: add + IL_0009: stfld int32 MyInt::x + IL_000e: ret + } // end of method MyInt::Incr + + .method public hidebysig newslot virtual final + instance void Decr(int32 a) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: dup + IL_0002: ldfld int32 MyInt::x + IL_0007: ldarg.1 + IL_0008: sub + IL_0009: stfld int32 MyInt::x + IL_000e: ret + } // end of method MyInt::Decr + + .method public hidebysig newslot virtual final + instance int32 Val() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 MyInt::x + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyInt::Val + +} // end of class MyInt + +.class private auto ansi beforefieldinit MyCounter<(IncrDecr) T> + extends [mscorlib]System.Object +{ + .field private !T counter + .field private !T[] counters + .method public hidebysig instance void + Increment() cil managed + { + // Code size 19 (0x13) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldflda !0 class MyCounter<!T>::counter + IL_0006: //box !T + IL_000b: ldc.i4.s 100 + constrained. !0 + IL_000d: callvirt instance void IncrDecr::Incr(int32) + IL_0012: ret + } // end of method MyCounter::Increment + + .method public hidebysig instance void + Decrement() cil managed + { + // Code size 19 (0x13) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class MyCounter<!T>::counter + IL_0006: box !T + IL_000b: ldc.i4.s 99 + IL_000d: callvirt instance void IncrDecr::Decr(int32) + IL_0012: ret + } // end of method MyCounter::Decrement + + .method public hidebysig instance void + Increment(int32 index) cil managed + { + // Code size 25 (0x19) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldarg.1 + IL_0007: ldelema !T + IL_000c: //box !T + IL_0011: ldc.i4.s 100 + constrained. !T + IL_0013: callvirt instance void IncrDecr::Incr(int32) + IL_0018: ret + } // end of method MyCounter::Increment + + .method public hidebysig instance void + Decrement(int32 index) cil managed + { + // Code size 25 (0x19) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldarg.1 + IL_0007: ldelem !T + IL_000c: box !T + IL_0011: ldc.i4.s 99 + IL_0013: callvirt instance void IncrDecr::Decr(int32) + IL_0018: ret + } // end of method MyCounter::Decrement + + .method public hidebysig newslot virtual + instance void Increment2(!T cnter) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarga 1 + IL_0001: //box !0 + IL_0006: ldc.i4.s 100 + constrained. !0 + IL_0008: callvirt instance void IncrDecr::Incr(int32) + IL_000d: ldarg.0 + IL_000e: ldarg.1 + IL_000f: stfld !0 class MyCounter<!0>::counter + IL_0014: ret + } // end of method MyCounter::Increment2 + + .method public hidebysig newslot virtual + instance void Decrement2(!T cnter) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: box !0 + IL_0006: ldc.i4.s 99 + IL_0008: callvirt instance void IncrDecr::Decr(int32) + IL_000d: ldarg.0 + IL_000e: ldarg.1 + IL_000f: stfld !0 class MyCounter<!0>::counter + IL_0014: ret + } // end of method MyCounter::Decrement2 + + .method public hidebysig instance int32 + Val() cil managed + { + // Code size 21 (0x15) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0 class MyCounter<!T>::counter + IL_0006: box !T + IL_000b: callvirt instance int32 IncrDecr::Val() + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method MyCounter::Val + + .method public hidebysig instance int32 + Val(int32 index) cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldarg.1 + IL_0007: ldelem !T + IL_000c: box !T + IL_0011: callvirt instance int32 IncrDecr::Val() + IL_0016: stloc.0 + IL_0017: br.s IL_0019 + + IL_0019: ldloc.0 + IL_001a: ret + } // end of method MyCounter::Val + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 19 (0x13) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: newarr !T + IL_0007: stfld !0[] class MyCounter<!T>::counters + IL_000c: ldarg.0 + IL_000d: call instance void [mscorlib]System.Object::.ctor() + IL_0012: ret + } // end of method MyCounter::.ctor + +} // end of class MyCounter + +.class private auto ansi beforefieldinit test + extends [mscorlib]System.Object +{ + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + // Code size 361 (0x169) + .maxstack 3 + .locals init (class MyCounter<valuetype MyInt> V_0, + valuetype MyInt V_1, + int32 V_2) + IL_0000: newobj instance void class MyCounter<valuetype MyInt>::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: callvirt instance void class MyCounter<valuetype MyInt>::Increment() + IL_000c: ldloc.0 + IL_000d: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_0012: ldc.i4.s 100 + IL_0014: beq.s IL_003c + + IL_0016: ldstr "FAILED" + IL_001b: call void [mscorlib]System.Console::WriteLine(string) + IL_0020: ldstr "Expected: 100, Actual: {0}" + IL_0025: ldloc.0 + IL_0026: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_002b: box [mscorlib]System.Int32 + IL_0030: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0035: ldc.i4.1 + IL_0036: stloc.2 + IL_0037: br IL_0167 + + IL_003c: ldloc.0 + IL_003d: callvirt instance void class MyCounter<valuetype MyInt>::Decrement() + IL_0042: ldloc.0 + IL_0043: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_0048: ldc.i4.s 100 + IL_004a: beq.s IL_0072 + + IL_004c: ldstr "FAILED" + IL_0051: call void [mscorlib]System.Console::WriteLine(string) + IL_0056: ldstr "Expected: 100, Actual: {0}" + IL_005b: ldloc.0 + IL_005c: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_0061: box [mscorlib]System.Int32 + IL_0066: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_006b: ldc.i4.2 + IL_006c: stloc.2 + IL_006d: br IL_0167 + + IL_0072: ldloc.0 + IL_0073: ldc.i4.0 + IL_0074: callvirt instance void class MyCounter<valuetype MyInt>::Increment(int32) + IL_0079: ldloc.0 + IL_007a: ldc.i4.0 + IL_007b: callvirt instance int32 class MyCounter<valuetype MyInt>::Val(int32) + IL_0080: ldc.i4.s 100 + IL_0082: beq.s IL_00ab + + IL_0084: ldstr "FAILED" + IL_0089: call void [mscorlib]System.Console::WriteLine(string) + IL_008e: ldstr "Expected: 100, Actual: {0}" + IL_0093: ldloc.0 + IL_0094: ldc.i4.0 + IL_0095: callvirt instance int32 class MyCounter<valuetype MyInt>::Val(int32) + IL_009a: box [mscorlib]System.Int32 + IL_009f: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_00a4: ldc.i4.3 + IL_00a5: stloc.2 + IL_00a6: br IL_0167 + + IL_00ab: ldloc.0 + IL_00ac: ldc.i4.0 + IL_00ad: callvirt instance void class MyCounter<valuetype MyInt>::Decrement(int32) + IL_00b2: ldloc.0 + IL_00b3: ldc.i4.0 + IL_00b4: callvirt instance int32 class MyCounter<valuetype MyInt>::Val(int32) + IL_00b9: ldc.i4.s 100 + IL_00bb: beq.s IL_00e4 + + IL_00bd: ldstr "FAILED" + IL_00c2: call void [mscorlib]System.Console::WriteLine(string) + IL_00c7: ldstr "Expected: 100, Actual: {0}" + IL_00cc: ldloc.0 + IL_00cd: ldc.i4.0 + IL_00ce: callvirt instance int32 class MyCounter<valuetype MyInt>::Val(int32) + IL_00d3: box [mscorlib]System.Int32 + IL_00d8: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_00dd: ldc.i4.4 + IL_00de: stloc.2 + IL_00df: br IL_0169 + IL_00e4: ldloca.s V_1 + IL_00e6: initobj MyInt + IL_00ec: ldloc.0 + IL_00ed: ldloc.1 + IL_00ee: callvirt instance void class MyCounter<valuetype MyInt>::Increment2(!0) + IL_00f3: ldloc.0 + IL_00f4: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_00f9: ldc.i4 100 + IL_00fe: beq.s IL_0123 + IL_0100: ldstr "FAILED" + IL_0105: call void [mscorlib]System.Console::WriteLine(string) + IL_010a: ldstr "Expected: 100, Actual: {0}" + IL_010f: ldloc.0 + IL_0110: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_0115: box [mscorlib]System.Int32 + IL_011a: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_011f: ldc.i4.5 + IL_0120: stloc.2 + IL_0121: br.s IL_0169 + IL_0123: ldloc.0 + IL_0124: ldloc.1 + IL_0125: callvirt instance void class MyCounter<valuetype MyInt>::Decrement2(!0) + IL_012a: ldloc.0 + IL_012b: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_0130: ldc.i4 0 + IL_0135: beq.s IL_015a + IL_0137: ldstr "FAILED" + IL_013c: call void [mscorlib]System.Console::WriteLine(string) + IL_0141: ldstr "Expected: 100, Actual: {0}" + IL_0146: ldloc.0 + IL_0147: callvirt instance int32 class MyCounter<valuetype MyInt>::Val() + IL_014c: box [mscorlib]System.Int32 + IL_0151: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0156: ldc.i4.6 + IL_0157: stloc.2 + IL_0158: br.s IL_0169 + IL_015a: ldstr "PASSED" + IL_015f: call void [mscorlib]System.Console::WriteLine(string) + IL_0164: ldc.i4.s 100 + IL_0166: stloc.2 + IL_0167: br.s IL_0169 + IL_0169: ldloc.2 + IL_016a: ret + + } // end of method test::Main + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method test::.ctor + +} diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt2.il b/tests/src/JIT/Generics/ConstrainedCall/vt2.il new file mode 100644 index 0000000000..660dc768b9 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt2.il @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// valuetype -Inherited method +// ldflda, ldelema, ldarga +// Val*A: constrained, Val*B: box + +.assembly extern mscorlib {} +.assembly vt2 {} +.class interface private abstract auto ansi IncrDecr +{ + .method public hidebysig newslot abstract virtual + instance int32 Val() cil managed + { + } // end of method IncrDecr::Val + +} // end of class IncrDecr + +.class private sequential ansi sealed beforefieldinit MyInt + extends [mscorlib]System.ValueType + implements IncrDecr +{ + .field private int32 x + .method public hidebysig newslot virtual final + instance int32 Val() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 MyInt::x + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyInt::Val + +} // end of class MyInt + +.class private auto ansi beforefieldinit MyCounter<(IncrDecr) T> + extends [mscorlib]System.Object +{ + .field private !T counter + .field private !T[] counters + .method public hidebysig instance int32 + Val1A() cil managed + { + // Code size 21 (0x15) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldflda !0 class MyCounter<!T>::counter + IL_0006: //box !T + constrained. !T + IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method MyCounter::Val1A + + .method public hidebysig instance int32 + Val2A() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldc.i4.0 + IL_0007: ldelema !T + IL_000c: //box !T + constrained. !T + IL_0011: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0016: stloc.0 + IL_0017: br.s IL_0019 + + IL_0019: ldloc.0 + IL_001a: ret + } // end of method MyCounter::Val2A + + .method public hidebysig instance int32 + Val3A(!T cnter) cil managed + { + // Code size 28 (0x1c) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 class MyCounter<!T>::counter + IL_0007: ldarg.0 + IL_0008: ldflda !0 class MyCounter<!T>::counter + IL_000d: //box !T + constrained. !T + IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0017: stloc.0 + IL_0018: br.s IL_001a + + IL_001a: ldloc.0 + IL_001b: ret + } // end of method MyCounter::Val3A + + .method public hidebysig instance int32 + Val1B() cil managed + { + // Code size 21 (0x15) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0 class MyCounter<!T>::counter + IL_0006: box !T + IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method MyCounter::Val1B + + .method public hidebysig instance int32 + Val2B() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldc.i4.0 + IL_0007: ldelem !T + IL_000c: box !T + IL_0011: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0016: stloc.0 + IL_0017: br.s IL_0019 + + IL_0019: ldloc.0 + IL_001a: ret + } // end of method MyCounter::Val2B + + .method public hidebysig instance int32 + Val3B(!T cnter) cil managed + { + // Code size 28 (0x1c) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 class MyCounter<!T>::counter + IL_0007: ldarg.0 + IL_0008: ldfld !0 class MyCounter<!T>::counter + IL_000d: box !T + IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0017: stloc.0 + IL_0018: br.s IL_001a + + IL_001a: ldloc.0 + IL_001b: ret + } // end of method MyCounter::Val3B + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 19 (0x13) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: newarr !T + IL_0007: stfld !0[] class MyCounter<!T>::counters + IL_000c: ldarg.0 + IL_000d: call instance void [mscorlib]System.Object::.ctor() + IL_0012: ret + } // end of method MyCounter::.ctor + +} // end of class MyCounter + +.class private auto ansi beforefieldinit test + extends [mscorlib]System.Object +{ + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + // Code size 218 (0xda) + .maxstack 4 + .locals init (class MyCounter<valuetype MyInt> V_0, + valuetype MyInt V_1, + int32 V_2) + IL_0000: newobj instance void class MyCounter<valuetype MyInt>::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1A() + IL_000c: ldloc.0 + IL_000d: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1B() + IL_0012: beq.s IL_0045 + + IL_0014: ldstr "FAILED" + IL_0019: call void [mscorlib]System.Console::WriteLine(string) + IL_001e: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_0023: ldloc.0 + IL_0024: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1A() + IL_0029: box [mscorlib]System.Int32 + IL_002e: ldloc.0 + IL_002f: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1B() + IL_0034: box [mscorlib]System.Int32 + IL_0039: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_003e: ldc.i4.1 + IL_003f: stloc.2 + IL_0040: br IL_00d8 + + IL_0045: ldloc.0 + IL_0046: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2A() + IL_004b: ldloc.0 + IL_004c: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2B() + IL_0051: beq.s IL_0081 + + IL_0053: ldstr "FAILED" + IL_0058: call void [mscorlib]System.Console::WriteLine(string) + IL_005d: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_0062: ldloc.0 + IL_0063: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2A() + IL_0068: box [mscorlib]System.Int32 + IL_006d: ldloc.0 + IL_006e: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2B() + IL_0073: box [mscorlib]System.Int32 + IL_0078: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_007d: ldc.i4.2 + IL_007e: stloc.2 + IL_007f: br.s IL_00d8 + + IL_0081: ldloca.s V_1 + IL_0083: initobj MyInt + IL_0089: ldloc.0 + IL_008a: ldloc.1 + IL_008b: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3A(!0) + IL_0090: ldloc.0 + IL_0091: ldloc.1 + IL_0092: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3B(!0) + IL_0097: beq.s IL_00c9 + + IL_0099: ldstr "FAILED" + IL_009e: call void [mscorlib]System.Console::WriteLine(string) + IL_00a3: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_00a8: ldloc.0 + IL_00a9: ldloc.1 + IL_00aa: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3A(!0) + IL_00af: box [mscorlib]System.Int32 + IL_00b4: ldloc.0 + IL_00b5: ldloc.1 + IL_00b6: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3B(!0) + IL_00bb: box [mscorlib]System.Int32 + IL_00c0: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_00c5: ldc.i4.3 + IL_00c6: stloc.2 + IL_00c7: br.s IL_00d8 + + IL_00c9: ldstr "PASSED" + IL_00ce: call void [mscorlib]System.Console::WriteLine(string) + IL_00d3: ldc.i4.s 100 + IL_00d5: stloc.2 + IL_00d6: br.s IL_00d8 + + IL_00d8: ldloc.2 + IL_00d9: ret + } // end of method test::Main + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method test::.ctor + +} diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt3.il b/tests/src/JIT/Generics/ConstrainedCall/vt3.il new file mode 100644 index 0000000000..57c76975af --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt3.il @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// valuetype -Implemented method +// ldflda, ldelema, ldarga +// Val*A: constrained, Val*B: box + +.assembly extern mscorlib {} +.assembly vt3 {} +.class interface private abstract auto ansi IncrDecr +{ + .method public hidebysig newslot abstract virtual + instance int32 Val() cil managed + { + } // end of method IncrDecr::Val + +} // end of class IncrDecr + +.class private sequential ansi sealed beforefieldinit MyInt + extends [mscorlib]System.ValueType + implements IncrDecr +{ + .field private int32 x + .method public hidebysig newslot virtual final + instance int32 Val() cil managed + { + // Code size 13 (0xd) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 MyInt::x + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: stloc.0 + IL_0009: br.s IL_000b + + IL_000b: ldloc.0 + IL_000c: ret + } // end of method MyInt::Val + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + // Code size 11 (0xb) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: call instance int32 MyInt::Val() + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MyInt::GetHashCode + +} // end of class MyInt + +.class private auto ansi beforefieldinit MyCounter<(IncrDecr) T> + extends [mscorlib]System.Object +{ + .field private !T counter + .field private !T[] counters + .method public hidebysig instance int32 + Val1A() cil managed + { + // Code size 21 (0x15) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldflda !0 class MyCounter<!T>::counter + IL_0006: //box !T + constrained. !T + IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method MyCounter::Val1A + + .method public hidebysig instance int32 + Val2A() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldc.i4.0 + IL_0007: ldelema !T + IL_000c: //box !T + constrained. !T + IL_0011: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0016: stloc.0 + IL_0017: br.s IL_0019 + + IL_0019: ldloc.0 + IL_001a: ret + } // end of method MyCounter::Val2A + + .method public hidebysig instance int32 + Val3A(!T cnter) cil managed + { + // Code size 28 (0x1c) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 class MyCounter<!T>::counter + IL_0007: ldarg.0 + IL_0008: ldflda !0 class MyCounter<!T>::counter + IL_000d: //box !T + constrained. !T + IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0017: stloc.0 + IL_0018: br.s IL_001a + + IL_001a: ldloc.0 + IL_001b: ret + } // end of method MyCounter::Val3A + + .method public hidebysig instance int32 + Val1B() cil managed + { + // Code size 21 (0x15) + .maxstack 1 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0 class MyCounter<!T>::counter + IL_0006: box !T + IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method MyCounter::Val1B + + .method public hidebysig instance int32 + Val2B() cil managed + { + // Code size 27 (0x1b) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld !0[] class MyCounter<!T>::counters + IL_0006: ldc.i4.0 + IL_0007: ldelem !T + IL_000c: box !T + IL_0011: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0016: stloc.0 + IL_0017: br.s IL_0019 + + IL_0019: ldloc.0 + IL_001a: ret + } // end of method MyCounter::Val2B + + .method public hidebysig instance int32 + Val3B(!T cnter) cil managed + { + // Code size 28 (0x1c) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld !0 class MyCounter<!T>::counter + IL_0007: ldarg.0 + IL_0008: ldfld !0 class MyCounter<!T>::counter + IL_000d: box !T + IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0017: stloc.0 + IL_0018: br.s IL_001a + + IL_001a: ldloc.0 + IL_001b: ret + } // end of method MyCounter::Val3B + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 19 (0x13) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldc.i4.1 + IL_0002: newarr !T + IL_0007: stfld !0[] class MyCounter<!T>::counters + IL_000c: ldarg.0 + IL_000d: call instance void [mscorlib]System.Object::.ctor() + IL_0012: ret + } // end of method MyCounter::.ctor + +} // end of class MyCounter + +.class private auto ansi beforefieldinit test + extends [mscorlib]System.Object +{ + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + // Code size 218 (0xda) + .maxstack 4 + .locals init (class MyCounter<valuetype MyInt> V_0, + valuetype MyInt V_1, + int32 V_2) + IL_0000: newobj instance void class MyCounter<valuetype MyInt>::.ctor() + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1A() + IL_000c: ldloc.0 + IL_000d: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1B() + IL_0012: beq.s IL_0045 + + IL_0014: ldstr "FAILED" + IL_0019: call void [mscorlib]System.Console::WriteLine(string) + IL_001e: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_0023: ldloc.0 + IL_0024: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1A() + IL_0029: box [mscorlib]System.Int32 + IL_002e: ldloc.0 + IL_002f: callvirt instance int32 class MyCounter<valuetype MyInt>::Val1B() + IL_0034: box [mscorlib]System.Int32 + IL_0039: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_003e: ldc.i4.1 + IL_003f: stloc.2 + IL_0040: br IL_00d8 + + IL_0045: ldloc.0 + IL_0046: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2A() + IL_004b: ldloc.0 + IL_004c: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2B() + IL_0051: beq.s IL_0081 + + IL_0053: ldstr "FAILED" + IL_0058: call void [mscorlib]System.Console::WriteLine(string) + IL_005d: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_0062: ldloc.0 + IL_0063: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2A() + IL_0068: box [mscorlib]System.Int32 + IL_006d: ldloc.0 + IL_006e: callvirt instance int32 class MyCounter<valuetype MyInt>::Val2B() + IL_0073: box [mscorlib]System.Int32 + IL_0078: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_007d: ldc.i4.2 + IL_007e: stloc.2 + IL_007f: br.s IL_00d8 + + IL_0081: ldloca.s V_1 + IL_0083: initobj MyInt + IL_0089: ldloc.0 + IL_008a: ldloc.1 + IL_008b: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3A(!0) + IL_0090: ldloc.0 + IL_0091: ldloc.1 + IL_0092: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3B(!0) + IL_0097: beq.s IL_00c9 + + IL_0099: ldstr "FAILED" + IL_009e: call void [mscorlib]System.Console::WriteLine(string) + IL_00a3: ldstr "mc.Val1A()={0}, mc.Val1B()={0}" + IL_00a8: ldloc.0 + IL_00a9: ldloc.1 + IL_00aa: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3A(!0) + IL_00af: box [mscorlib]System.Int32 + IL_00b4: ldloc.0 + IL_00b5: ldloc.1 + IL_00b6: callvirt instance int32 class MyCounter<valuetype MyInt>::Val3B(!0) + IL_00bb: box [mscorlib]System.Int32 + IL_00c0: call void [mscorlib]System.Console::WriteLine(string, + object, + object) + IL_00c5: ldc.i4.3 + IL_00c6: stloc.2 + IL_00c7: br.s IL_00d8 + + IL_00c9: ldstr "PASSED" + IL_00ce: call void [mscorlib]System.Console::WriteLine(string) + IL_00d3: ldc.i4.s 100 + IL_00d5: stloc.2 + IL_00d6: br.s IL_00d8 + + IL_00d8: ldloc.2 + IL_00d9: ret + } // end of method test::Main + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method test::.ctor + +} diff --git a/tests/src/JIT/Generics/regression/DDB148379/DDB148379.ilproj b/tests/src/JIT/Generics/regression/DDB148379/DDB148379.ilproj new file mode 100644 index 0000000000..c641f8da8a --- /dev/null +++ b/tests/src/JIT/Generics/regression/DDB148379/DDB148379.ilproj @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> + </PropertyGroup> + <Target Name="Build"> + <ItemGroup> + <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.il" /> + </ItemGroup> + <PropertyGroup> + <GenerateRunScript>false</GenerateRunScript> + </PropertyGroup> + <MSBuild Projects="il_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" /> + </Target> +</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Generics/regression/DDB148379/app.config b/tests/src/JIT/Generics/regression/DDB148379/app.config new file mode 100644 index 0000000000..8077c95440 --- /dev/null +++ b/tests/src/JIT/Generics/regression/DDB148379/app.config @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/tests/src/JIT/Generics/regression/DDB148379/ddb148379.il b/tests/src/JIT/Generics/regression/DDB148379/ddb148379.il new file mode 100644 index 0000000000..f0f1dfa862 --- /dev/null +++ b/tests/src/JIT/Generics/regression/DDB148379/ddb148379.il @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + + + + +// Metadata version: v2.0.20910 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 2:0:0:0 +} +.assembly crash +{ + .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. + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module crash.exe +// MVID: {29D488A1-3C00-4F7C-86C0-B123ECE8AAA6} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x002E0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class interface private abstract auto ansi IMyInterface`1<T> +{ + .method public hidebysig newslot abstract virtual + instance int32 foo<U>() cil managed + { + } // end of method IMyInterface`1::foo + +} // end of class IMyInterface`1 + +.class private sequential ansi sealed beforefieldinit MyStruct`1<T> + extends [mscorlib]System.ValueType + implements class IMyInterface`1<!T> +{ + .pack 0 + .size 1 + .method public hidebysig newslot virtual final + instance int32 foo<U>() cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: ldtoken class [mscorlib]System.Collections.Generic.Dictionary`2<!T,!!U> + IL_0005: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + dup + IL_000a: call void [mscorlib]System.Console::WriteLine(object) + callvirt instance string [mscorlib]System.Object::ToString() + ldstr "System.Collections.Generic.Dictionary`2[System.String,System.Object]" + call bool [mscorlib]System.String::op_Inequality(string, + string) + ldc.i4.0 + beq IL_000f + ldstr "FAIL" + call void [mscorlib]System.Console::WriteLine(string) + ldc.i4 99 + ret + IL_000f: ldc.i4 100 + ret + } // end of method MyStruct`1::foo + +} // end of class MyStruct`1 + +.class private sequential ansi sealed beforefieldinit MyStruct2`1<T> + extends [mscorlib]System.ValueType + implements class IMyInterface`1<!T> +{ + .pack 0 + .size 1 + .method public hidebysig newslot virtual final + instance int32 foo<U>() cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: ldtoken class [mscorlib]System.Collections.Generic.Dictionary`2<!!U,!T> + IL_0005: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle) + dup + IL_000a: call void [mscorlib]System.Console::WriteLine(object) + callvirt instance string [mscorlib]System.Object::ToString() + ldstr "System.Collections.Generic.Dictionary`2[System.Object,System.String]" + call bool [mscorlib]System.String::op_Inequality(string, + string) + ldc.i4.0 + beq IL_000f + ldstr "FAIL" + call void [mscorlib]System.Console::WriteLine(string) + ldc.i4 99 + ret + + IL_000f: ldc.i4 100 + ret + + } // end of method MyStruct2`1::foo + +} // end of class MyStruct2`1 + +.class private auto ansi beforefieldinit My + extends [mscorlib]System.Object +{ + .method private hidebysig static int32 Main() cil managed + { + .entrypoint + // Code size 35 (0x23) + .maxstack 8 + .locals init (valuetype MyStruct`1<string> V_0, + valuetype MyStruct2`1<string> V_1) + IL_0000: ldloca.s V_0 + IL_0002: initobj valuetype MyStruct`1<string> + IL_0008: ldloca.s V_0 + IL_000a: constrained. valuetype MyStruct`1<string> + IL_0010: callvirt instance int32 class IMyInterface`1<string>::foo<object>() + ldc.i4 100 + beq IL_0015 + ldc.i4 99 + br IL_0022 + IL_0015: ldloca.s V_1 + IL_0017: constrained. valuetype MyStruct2`1<string> + IL_001d: callvirt instance int32 class IMyInterface`1<string>::foo<object>() + ldc.i4 100 + beq IL_0020 + ldc.i4 99 + br.s IL_0022 + IL_0020: ldc.i4 100 + IL_0022: ret + } // end of method My::Main + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method My::.ctor + +} // end of class My + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/src/JIT/Generics/regression/DDB148379/il_template.proj b/tests/src/JIT/Generics/regression/DDB148379/il_template.proj new file mode 100644 index 0000000000..cd6913e79e --- /dev/null +++ b/tests/src/JIT/Generics/regression/DDB148379/il_template.proj @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(AssemblyName1)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <RestorePackages>true</RestorePackages> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + <ProjectLanguage>IL</ProjectLanguage> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <ItemGroup> + <Compile Include="$(AssemblyName1).il" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project>
\ No newline at end of file diff --git a/tests/src/JIT/Generics/regression/DDB148379/packages.config b/tests/src/JIT/Generics/regression/DDB148379/packages.config new file mode 100644 index 0000000000..37e10b961a --- /dev/null +++ b/tests/src/JIT/Generics/regression/DDB148379/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="System.Console" version="4.0.0-beta-22405" /> + <package id="System.Runtime" version="4.0.20-beta-22405" /> + <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" /> +</packages>
\ No newline at end of file |