area-CodeGen-coreclrhelp wanted
仓库指标
- Star
- (17,886 star)
- PR 合并指标
- (平均合并 12天 11小时) (30 天内合并 661 个 PR)
描述
The following F# snippet:
let test() = typeof<float> = typeof<bool>
Emits this IL:
ldtoken !!a
call class [netstandard]System.Type [netstandard]System.Type::GetTypeFromHandle(valuetype [netstandard]System.RuntimeTypeHandle)
ldtoken [System.Runtime]System.Boolean
call class [netstandard]System.Type [netstandard]System.Type::GetTypeFromHandle(valuetype [netstandard]System.RuntimeTypeHandle)
tail.
call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityIntrinsic<class [System.Runtime]System.Type>(!!0, !!0)
ret
and this codegen:
_.test()
L0000: push rsi
L0001: sub rsp, 0x20
L0005: mov rcx, 0x7ff9f93c77a8
L000f: call 0x00007ffa58e77670
L0014: mov rsi, rax
L0017: mov rcx, 0x7ff9f934b3c0
L0021: call 0x00007ffa58e77670
L0026: mov r8, rax
L0029: mov rdx, rsi
L002c: mov rcx, 0x7ff9febc1e88
L0036: mov rax, 0x7ff9feb43be8
L0040: add rsp, 0x20
L0044: pop rsi
L0045: jmp qword ptr [rax]
expected codegen:
_.test()
L0000: xor eax, eax
L0002: ret