Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Restore ability to compile against Test.CoreLib#3674

Merged
jkotas merged 3 commits intodotnet:masterfrom
MichalStrehovsky:testCorelib
May 23, 2017
Merged

Restore ability to compile against Test.CoreLib#3674
jkotas merged 3 commits intodotnet:masterfrom
MichalStrehovsky:testCorelib

Conversation

@MichalStrehovsky
Copy link
Member

Building against the lightweight version of S.P.CoreLib has bitrotted
over the past year. The classlib is handy for codegen and architecture
bringups and we might want to use it when getting rid of ready to run
helpers.

Building against the lightweight version of S.P.CoreLib has bitrotted
over the past year. The classlib is handy for codegen and architecture
bringups and we might want to use it when getting rid of ready to run
helpers.
CorInfoType type = asCorInfoType(fieldType, out structType);

Debug.Assert(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.ByReferenceOfT).GetKnownField("_value").FieldType.Category == TypeFlags.IntPtr);
Debug.Assert(_compilation.TypeSystemContext.GetWellKnownType(WellKnownType.ByReferenceOfT, false) == null ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relatively expensive to execute for every getFieldType even before this change. Change it to:

Debug.Assert(fieldDesc.OwningType.IsByReferenceOfT && ... the long condition here ...)

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also ended up being shorter. Thanks!

@jkotas jkotas merged commit 9a1e20d into dotnet:master May 23, 2017
@MichalStrehovsky MichalStrehovsky deleted the testCorelib branch May 23, 2017 04:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants