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

Review IL generated for conversions between primitive types and native integers #42457

Closed
cston opened this issue Mar 15, 2020 · 1 comment · Fixed by #48229
Closed

Review IL generated for conversions between primitive types and native integers #42457

cston opened this issue Mar 15, 2020 · 1 comment · Fixed by #48229

Comments

@cston
Copy link
Member

cston commented Mar 15, 2020

Review the IL generated for the conversions in NativeIntegerTests.Conversions():

  • The conversions to/from void* use System.[U]IntPtr.op_Explicit(void*) rather than conv.i or conv.u.
  • The unchecked and checked conversions of long and ulong differ (for instance, converting nint to ulong uses conv.i8 when unchecked but conv.ovf.u8 when checked).
@cston
Copy link
Member Author

cston commented Sep 15, 2020

  • The conversions to/from void* use System.[U]IntPtr.op_Explicit(void*) rather than conv.i or conv.u.

Fixed in #47708.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants