Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/runtime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1063fc278534
Choose a base ref
...
head repository: dotnet/runtime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4ec422386bd
Choose a head ref
  • 20 commits
  • 159 files changed
  • 16 contributors

Commits on Jan 8, 2024

  1. [mono] Fix passing of valuetypes with a non-8 byte aligned size on ar…

    …m64+ios/macos. (#96079)
    
    * [mono] Fix passing of valuetypes with a non-8 byte aligned size on arm64+ios/macos.
    
    Part of the fix for #96051.
    
    * Reenable tests on non-interpreter.
    
    * Fix.
    vargaz authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    1791abd View commit details
    Browse the repository at this point in the history
  2. [mono][aot] Allow valuetype sharing in wrappers for valuetypes with a…

    …n explicit layout if the explicit size matches the computed size. (#96230)
    
    This happens for Vector64<T>/Vector128<T>.
    vargaz authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    e9cd01a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1df91d3 View commit details
    Browse the repository at this point in the history
  4. Revamp empty special-casing in LINQ (#96602)

    * Revamp empty special-casing in LINQ
    
    Enumerable.Empty used to return Array.Empty. Towards the beginning of .NET Core, LINQ was imbued with an internal "partition" concept for flowing more information around between operators, and as part of that, Empty was changed to return a singleton instance of a specialized partition implementation. The upside of this was that methods typed to return IPartition could return the same singleton as Empty. There are multiple downsides, however. For one, the whole IPartition concept is only built into a "speed-optimized" build of LINQ; builds that care more about size (e.g. browser) end up not having it, and thus Empty there ends up being Array.Empty, such that a different type ends up being returned based on the build, which is not ideal. Further, any paths that check for empty now effectively have two things to check for: the empty partition or an empty array, making those checks more expensive, if they're even done at all, or in some cases missing out on possible optimization. This is more pronounced today, now that `[]` with collection expressions will produce Array.Empty, and it'd be really nice if there wasn't a difference between Enumerable.Empty and `[]` assigned to `IEnumerable<T>`.
    
    This change puts Enumerable.Empty back to always being Array.Empty. The internal IPartition-based APIs that drove us to need the EmptyPartition are changed to just use null as an indication of empty. Places we were already checking for `is EmptyPartition` are changed to check for an empty array (if they weren't already), and other APIs that weren't checking at all now have a check if it makes sense to do so (I audited all of the APIs, and didn't include checks in ones where it could meaningfully affect semantics, e.g. a fast path that might cause us not to get an enumerator from a secondary enumerable input).
    
    * Rename IsImmutableEmpty to IsEmptyArray per PR feedback
    
    * Remove bogus PLINQ tests
    
    The tests were validating the underlying type of the operator returned for Concat, which is not material.
    
    * Fix Skip special-casing
    
    The check needs to be moved to before the count <= 0 check... otherwise calling Skip on an empty array with a count of 0 would still allocate an iterator.
    stephentoub authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    8ffc96c View commit details
    Browse the repository at this point in the history
  5. Update Enumerable.Min/Max for all IBinaryIntegers (#96605)

    The implementations are special-casing most of the built-in ones, in order to delegate to the IBinaryInteger-constrained helper, but it was missing Int128, UInt128, and char. ?hese won't be vectorized, but they'll at least use the more streamlined non-vectorized implementations.
    stephentoub authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    0823c5c View commit details
    Browse the repository at this point in the history
  6. Allow specifying IndentCharacter and IndentSize when writing JSON (#9…

    …5292)
    
    * Add IndentText json option
    
    * Add IndentText for json source generator
    
    * Add tests
    
    * IndentText must be non-nullable
    
    * Improve performance
    
    * Add extra tests
    
    * Cleanup
    
    * Apply suggestions from code review
    
    Co-authored-by: Eirik Tsarpalis <[email protected]>
    
    * Fixes following code review
    
    * Fixes following code review #2
    
    * Add tests for invalid characters
    
    * Handle RawIndent length
    
    * Move all to RawIndentation
    
    * Update documentation
    
    * Additional fixes from code review
    
    * Move to the new API
    
    * Extra fixes and enhancements
    
    * Fixes from code review
    
    * Avoid introducing extra fields in JsonWriterOptions
    
    * Fix OOM error
    
    * Use bitwise logic for IndentedOrNotSkipValidation
    
    * Cache indentation options in Utf8JsonWriter
    
    * Add missing test around indentation options
    
    * New fixes from code review
    
    * Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
    
    * Add test to check default values of the JsonWriterOptions properties
    
    * Fix comment
    
    ---------
    
    Co-authored-by: Eirik Tsarpalis <[email protected]>
    manandre and eiriktsarpalis authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    37ed0ee View commit details
    Browse the repository at this point in the history
  7. [mono][jit] Optimize the experimental-gshared-mrgctx code (#96104)

    * [mono][jit] Avoid creating rgctx trampolines to call gshared methods which don't use their mrgctx arg.
    
    * Implement MONO_ARCH_HAVE_INIT_MRGCTX for x64.
    
    * Implement a cross-platform optimized version of OP_INIT_MRGCTX.
    vargaz authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    ffdb3e4 View commit details
    Browse the repository at this point in the history
  8. Fix generic signature issue when calling non generic method of closed…

    … generic type (#96517)
    
    * Fix generic signature issue when calling non generic method of closed generic type
    
    * Apply feedbacks
    buyaa-n authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    96851fc View commit details
    Browse the repository at this point in the history
  9. Update dependencies from https://dev.azure.com/dnceng/internal/_git/d…

    …otnet-optimization build 20240106.4 (#96619)
    
    optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
     From Version 1.0.0-prerelease.23629.4 -> To Version 1.0.0-prerelease.24056.4
    
    Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
    dotnet-maestro[bot] and dotnet-maestro[bot] authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    cd0e33b View commit details
    Browse the repository at this point in the history
  10. [mono][amd64] Fix Vector128 relational comparison API's for nuint type (

    #96515)
    
    * Fix uint greatetThan
    
    * Enable disabled tests
    
    * Add a new test
    fanyang-mono authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    f0ca0fa View commit details
    Browse the repository at this point in the history
  11. [wasm] Fix a few more paths to in-tree emsdk (#96625)

    It was moved from src/mono/wasm to src/mono/browser in #95940
    akoeplinger authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    425e74c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e2f58fe View commit details
    Browse the repository at this point in the history
  13. Replace LINQ's ArrayBuilder, LargeArrayBuilder, and SparseArrayBuilder (

    #96570)
    
    There's a lot of code involved in these, some of which we special-case to only build into some of the targets, and it's unnecessarily complicated.  We can get most of the benefit with a simpler solution, which this attempts to provide. This commit removes those three types and replaces them with a SegmentedArrayBuilder.
    
    The changes to ToArray also obviate the need for the old Buffer type. It existed to avoid one array allocation at the end of loading an enumerable, where we'd doubled and doubled and doubled in size, and then eventually have an array with all the data but some extra space. Now that we don't have such an array, we don't need Buffer, and can just the normal Enumerable.ToArray.
    
    The one thing the new scheme doesn't handle as well is when there are multiple sources being added (specifically in Concat / SelectMany). Previously, the code used a complicated scheme to reserve space in the output for partial sources known to be ICollections, so it could use ICollection.CopyTo for each consistuent source. But CopyTo doesn't support partial copies, which means we can only use it if there's enough room available in an individual segment. The implementation thus tries to use it, and falls back to normal enumeration if it can't. For larger enumerations where the cost would end up being more apparent, the expectation is we'd quickly grow to a segment size where the subsequent appends are able to fit into the current segment. Hopefully.
    stephentoub authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    f44d62c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    499e288 View commit details
    Browse the repository at this point in the history
  15. Fix typo (#95569)

    murshex authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    806c365 View commit details
    Browse the repository at this point in the history
  16. add SerialStream support for MacCatalyst (#96492)

    * add SerialStream support for MacCatalyst
    
    * feedback from review
    
    * Explicitly set SupportedOSPlatforms for maccatalyst
    
    It'd default to the unsupported annotation from iOS otherwise.
    
    ---------
    
    Co-authored-by: Alexander Köplinger <[email protected]>
    wfurt and akoeplinger authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    17335f4 View commit details
    Browse the repository at this point in the history
  17. Remove extraneous use of unchecked from System.Linq (#96622)

    The code doesn't use a checked configuration, and if it did there are other expected overflows that would erroneously fail.
    stephentoub authored Jan 8, 2024
    Configuration menu
    Copy the full SHA
    0451127 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f21dc6c View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Add .NET 8 test project for System.Numerics.Tensors (#96641)

    * Add .NET 8 test project for System.Numerics.Tensors
    
    * Update src/libraries/System.Numerics.Tensors/tests/Net8Tests/System.Numerics.Tensors.Net8.Tests.csproj
    
    Co-authored-by: Viktor Hofer <[email protected]>
    
    ---------
    
    Co-authored-by: Viktor Hofer <[email protected]>
    stephentoub and ViktorHofer authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    315a2a8 View commit details
    Browse the repository at this point in the history
  2. Add debug-only use of new AssemblyBuilder.Save in Regex.CompileToAsse…

    …mbly (#96462)
    
    * Add debug-only use of new AssemblyBuilder.Save in Regex.CompileToAssembly
    
    To aid in debugging RegexCompiler issues and to help vet the new AssemblyBuilder.Save support.
    
    * Fix IL2121 warnings
    
    ---------
    
    Co-authored-by: Sven Boemer <[email protected]>
    stephentoub and sbomer authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b4ec422 View commit details
    Browse the repository at this point in the history
Loading