Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert a few trivial Type, RuntimeType and Enum FCalls to C##71873

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jkotas merged 1 commit intodotnet:mainfromjkotas:GetUnderlyingType
Jul 10, 2022

Conversation

jkotas
Copy link
Member

No description provided.

jkoritzinsky, am11, PaulusParssinen, SupinePandora43, Sergio0694, aromaa, Rekkonnect, and pentp reacted with rocket emoji
@ghostghost assignedjkotasJul 9, 2022
@ghost
Copy link

Tagging subscribers to this area: @dotnet/area-system-reflection
See info inarea-owners.md if you want to be subscribed.

Issue Details

null

Author:jkotas
Assignees:jkotas
Labels:

area-System.Reflection

Milestone:-

@jkotas
Copy link
MemberAuthor

This makesEnum.GetUnderlyingType about 6x faster.

gfoidl, EgorBo, PaulusParssinen, Sergio0694, saul, buyaa-n, filipnavara, Suchiman, and omariom reacted with rocket emoji

@jkotasjkotasforce-pushed theGetUnderlyingType branch 2 times, most recently from7443c81 to9ae0a8dCompareJuly 9, 2022 06:19
@jkotas
Copy link
MemberAuthor

I am going to revert the change for IsEnum. It is behavior change for generic variables. We do not have a test coverage for it. The test coverage needs to be fixed first.

@jkotasjkotas added the NO-MERGEThe PR is not ready for merge yet (see discussion for detailed reasons) labelJul 9, 2022
@jkotas
Copy link
MemberAuthor

For example, this prints true currently, but it would print false with this change:

Type param = typeof(MyG<>).GetGenericArguments()[0];Console.WriteLine(param.IsEnum);class MyG<T> where T: Enum{}

@jkotas
Copy link
MemberAuthor

And this fails with Internal CLR error. currently:

Type param = typeof(MyG<>).GetGenericArguments()[0];Console.WriteLine(Enum.GetUnderlyingType(param));class MyG<T> where T: Enum{}

@jkotas
Copy link
MemberAuthor

And this fails with Internal CLR error. currently:

Opened#71884

@jkotasjkotas removed the NO-MERGEThe PR is not ready for merge yet (see discussion for detailed reasons) labelJul 9, 2022
@jkotasjkotas merged commitef29389 intodotnet:mainJul 10, 2022
@jkotasjkotas deleted the GetUnderlyingType branchJuly 10, 2022 01:01
@EgorBo
Copy link
Member

Improvements on win-arm64:dotnet/perf-autofiling-issues#6757

am11 reacted with rocket emoji

@dakersnar
Copy link
Contributor

Improvements on ubuntu arm64:dotnet/perf-autofiling-issues#6982

@ghostghost locked asresolvedand limited conversation to collaboratorsSep 9, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EgorBoEgorBoEgorBo approved these changes

@stephentoubstephentoubstephentoub approved these changes

@marek-safarmarek-safarAwaiting requested review from marek-safar

Assignees

@jkotasjkotas

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@jkotas@EgorBo@dakersnar@stephentoub

[8]ページ先頭

©2009-2025 Movatter.jp