Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Mark Span.Length as non-versionable#13931

Merged
jkotas merged 2 commits intodotnet:masterfrom
jkotas:span-nonversionable
Sep 13, 2017
Merged

Mark Span.Length as non-versionable#13931
jkotas merged 2 commits intodotnet:masterfrom
jkotas:span-nonversionable

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Sep 13, 2017

cc @ahsonkhan

(These changes should not be ported to the slow Span.)

This allows inlining Span.Length accross versioning boundaries in R2R images. We are leaking the Span implementation details already because the Span indexer is treated as intrinsic. Marking a few more trivial methods as non-versionable should not do any future harm.
Before this fix, corerun would AV on certain invalid paths e.g.: corerun test.exe\
@jkotas jkotas merged commit c81f372 into dotnet:master Sep 13, 2017
@ahsonkhan
Copy link

What does it mean to mark a struct as NonVersionable?

@jkotas
Copy link
Member Author

jkotas commented Sep 13, 2017

It means that precompiled R2R images will have more efficient code for it, but you are promissing that the layout of the structure will never change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants