Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeIntrinsics_il tests #1271

Merged
merged 3 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions src/coreclr/tests/src/JIT/Intrinsics/TypeIntrinsics_il.il
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,30 +14,29 @@
{
.entrypoint
.maxstack 1
// it's not currently possible to produce `ldtoken string&` in C#
ldtoken [System.Runtime]System.String&
// 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 [System.Runtime]System.Int16&
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()
brfalse.s FAILED
brtrue.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&
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()
brfalse.s FAILED
brtrue.s FAILED

ldc.i4.s 100
ret

FAILED:
ldc.i4.s 42
ret
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
Expand Down