From 8d1eede412cb2106e6da460ac276d001da94c493 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Fri, 3 Jan 2020 13:10:27 +0300 Subject: [PATCH 1/3] Fix TypeIntrinsics_il.il --- .../tests/src/JIT/Intrinsics/TypeIntrinsics_il.il | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il index aa9fee650c49f..5d5986046afc0 100644 --- a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il +++ b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il @@ -17,26 +17,16 @@ .entrypoint .maxstack 1 // it's not currently possible to produce `ldtoken string&` in C# - ldtoken [System.Runtime]System.String& + ldtoken string& call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) call instance bool [System.Runtime]System.Type::get_IsValueType() brtrue FAILED - ldtoken [System.Runtime]System.Int16& - call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) - call instance bool [System.Runtime]System.Type::get_IsValueType() - brfalse.s FAILED - - ldtoken [System.Runtime]System.Object& + ldtoken object& call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) call instance bool [System.Runtime]System.Type::get_IsValueType() brtrue.s FAILED - ldtoken [System.Runtime]System.Decimal& - call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) - call instance bool [System.Runtime]System.Type::get_IsValueType() - brfalse.s FAILED - ldc.i4.s 100 ret From 86fe2bbe264b18a774a9a5f770a7d65a120715e4 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Fri, 3 Jan 2020 13:12:38 +0300 Subject: [PATCH 2/3] Remove CLRTestPriority --- src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.ilproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.ilproj b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.ilproj index 4a2b6058f348e..0f82ec220c766 100644 --- a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.ilproj +++ b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.ilproj @@ -1,7 +1,6 @@ Exe - 1 PdbOnly From d3302403241ad480d9feb706bd194d369dbe3f5a Mon Sep 17 00:00:00 2001 From: EgorBo Date: Tue, 7 Jan 2020 15:58:22 +0300 Subject: [PATCH 3/3] Address feedback --- .../src/JIT/Intrinsics/TypeIntrinsics_il.il | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il index 5d5986046afc0..0e38349f9f0f1 100644 --- a/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il +++ b/src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } +.assembly extern mscorlib { auto } +.assembly extern System.Runtime { auto } -.assembly TypeIntrinsicsTests -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) -} +.assembly TypeIntrinsicsTests { } .class private auto ansi beforefieldinit Test extends [mscorlib]System.Object @@ -16,20 +14,29 @@ { .entrypoint .maxstack 1 - // it's not currently possible to produce `ldtoken string&` in C# + // it's not currently possible to produce `ldtoken [type]&` in C# ldtoken string& call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) call instance bool [System.Runtime]System.Type::get_IsValueType() - brtrue FAILED + brtrue.s FAILED + + ldtoken valuetype [System.Runtime]System.Int16& + call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) + call instance bool [System.Runtime]System.Type::get_IsValueType() + brtrue.s FAILED ldtoken object& call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) call instance bool [System.Runtime]System.Type::get_IsValueType() brtrue.s FAILED + ldtoken valuetype [System.Runtime]System.Decimal& + call class [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle(valuetype [System.Runtime]System.RuntimeTypeHandle) + call instance bool [System.Runtime]System.Type::get_IsValueType() + brtrue.s FAILED + ldc.i4.s 100 ret - FAILED: ldc.i4.s 42 ret