-
Notifications
You must be signed in to change notification settings - Fork 5.3k
issue-22928 Add ImmutableArray Span-based APIs #61196
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
Merged
eiriktsarpalis
merged 29 commits into
dotnet:main
from
lateapexearlyspeed:lateapexearlyspeed-issue-22928-SpanBasedImmutableArray
Feb 10, 2022
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
f0c9ca8
issue-22928 Initial commit: AddRange, InsertRange, ToImmutableArray, …
lateapexearlyspeed 4ce2f25
issue-22928 CopyTo, RemoveRange, Slice. Skip old tests.
lateapexearlyspeed 10ed570
Eliminate range based method compilation for .netstandard2.0 and net461.
lateapexearlyspeed 89810ad
issue-22928 Refine to use common code.
lateapexearlyspeed 4f1ef20
Try to use <framework>_OR_GREATER pre-compilation symbol.
lateapexearlyspeed 6691eda
issue-22928 Test cases of ImmutableArray.Create() overloads.
lateapexearlyspeed b46c0af
issue-22928 Add test cases for ImmutableArray.ToImmutableArray(), Imm…
lateapexearlyspeed 3144366
Test cases for AsSpan(start, length).
lateapexearlyspeed d0571c4
Test cases of AsSpan(Range).
lateapexearlyspeed 1516ed0
Test cases of ImmutableArray.CopyTo().
lateapexearlyspeed c8e2b68
Test cases of InsertRange().
lateapexearlyspeed 7fd7041
Test cases of RemoveRange().
lateapexearlyspeed 1f67b98
Add test cases of .Slice().
lateapexearlyspeed f10ae91
Add test cases of Builder.CopyTo() and Builder.AddRange().
lateapexearlyspeed 4078a17
Add xml doc for AsSpan(Range) method.
lateapexearlyspeed 932e731
Fix comment: refine test cases; adjust method list order; add Debug.A…
lateapexearlyspeed c4384df
Fix comment: move tfm specific code into separate tfm files.
lateapexearlyspeed c470255
Fix ValidateDefaultThisBehavior() logic issue.
lateapexearlyspeed b29f105
Fix comment: use compile condition: $(TargetFrameworkIdentifier)' == …
lateapexearlyspeed d98e0d9
Fix comment: specify actual data length when construct span.
lateapexearlyspeed 50e278d
Change RemoveRange(ReadOnlySpan) to be O(M+N) implementation.
lateapexearlyspeed ba0fa13
Fix comment: refine xml doc.
lateapexearlyspeed fb1dd63
Fix comment: Use new CollectionsMarshal methods to get and update val…
lateapexearlyspeed 7441ab9
Fix comment: refine RemoveRange() to use 'continue'.
lateapexearlyspeed f1d1d34
Fix comment: merge 2 tfm version RemoveRange() back to ImmutableArray…
lateapexearlyspeed 5366414
Add some demo-used test cases to indicate (null & custom equalityComp…
lateapexearlyspeed 1460a51
Revert "Change RemoveRange(ReadOnlySpan) to be O(M+N) implementation."
lateapexearlyspeed 85ebef4
Fix comment: use explicit type name; enhance RemoveRange test cases t…
lateapexearlyspeed 1bb557c
Use explicit type names.
lateapexearlyspeed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.netcoreapp.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // ------------------------------------------------------------------------------ | ||
| // Changes to this file must follow the https://aka.ms/api-review process. | ||
| // ------------------------------------------------------------------------------ | ||
|
|
||
| namespace System.Collections.Immutable | ||
| { | ||
| public readonly partial struct ImmutableArray<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.Immutable.IImmutableList<T>, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IEquatable<System.Collections.Immutable.ImmutableArray<T>> | ||
| { | ||
| public System.ReadOnlySpan<T> AsSpan(System.Range range) { throw null; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.