Commit Graph
636 Commits
Author SHA1 Message Date
3745e3829e Vectorize SpanHelpers<T>.IndexOf (#60974)
Co-authored-by: Günther Foidl <[email protected]>
Co-authored-by: Dan Moseley <[email protected]>
2021-11-22 19:21:26 +01:00
Viktor Hofer 0964be0ae9 Update slngen and solution files (#60871)
Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
2021-10-26 21:23:54 +02:00
Aaron Robinson 53e8c7c3b6 Reflection Invoke share more coreclr/mono (#60270)
* Remove ActiveIssues from some mono tests.

* Convert INVOCATION_FLAGS enum to repo style casing.

* Rename various files to match partial class style.
2021-10-16 09:18:44 -07:00
LateApexEarlySpeedandJeff Handley 6890b50863 lateapexearlyspeed-issue-30778 Create method: TryReadExact(). (#57921)
* lateapexearlyspeed-issue-30778 Create method: TryReadExact().

* issue-30778 Add test for SequenceReader.TryReadExact().

* issue-30778 Fix comment: format return xml doc.

Co-authored-by: Jeff Handley <[email protected]>

Co-authored-by: Jeff Handley <[email protected]>
2021-10-12 22:53:11 -07:00
Egor Bogatov 025c84dd00 Fix genCodeForInitBlkUnroll for x86 (#59873) 2021-10-04 22:19:25 +03:00
Krzysztof Wicher 8f12df6f3f disable System.SpanTests.SpanTests.FillNativeBytes (#59563) 2021-09-24 11:03:37 -04:00
Andrii Kurdiumov 5588f94924 Remove usused rd.xml files (#59201)
Closes #51112
2021-09-16 16:53:54 -06:00
Viktor Hofer 36b6247cc7 Update solution files for correct ordering of elements (#58655)
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.

Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
2021-09-04 00:16:15 +02:00
Sergey AndreenkoandDavid Wrighton bc7081e81d Fix VN incorrect optimizations with a new JitEEInterface function. (#57282)
* Add/return tests.

* improve the test naming.

* Add a new JitEE method.

with a naive implementation so far.

* Handle generically dissimilar type concerns as well as handle derived type case in the managed compiler

* Fix the field and Unsafe issues.

* fix some failures.

It appeared that we have many trees where we generate unique VN for rhs and don't inform `fgValueNumberBlockAssignment` about it.
For example, for
```
N005 ( 10,  8) [000033] -A--G---R---              *  ASG       struct (copy)
N004 (  3,  2) [000031] D------N----              +--*  LCL_VAR   struct<eightByteStruct, 8> V01 loc1         d:2
N003 (  6,  5) [000030] n---G-------              \--*  IND       struct
N002 (  3,  3) [000043] ------------                 \--*  ADDR      byref
N001 (  3,  2) [000044] -------N----                    \--*  LCL_VAR   struct<largeStruct, 32> V00 loc0         u:6 (last use)
```
we will generate unique rhs but then `fgValueNumberBlockAssignment` will still try to work it as with a non-unique one.

* Fix an oooold bug in VN.

For a tree like:
```
N005 ( 11, 10) [001400] -A------R----             *  ASG       long
N004 (  6,  5) [001401] *------N-----             +--*  IND       long
N003 (  3,  3) [001402] -------------             |  \--*  ADDR      byref  Zero Fseq[_00]
N002 (  3,  2) [001403] U------N-----             |     \--*  LCL_VAR   struct<System.Runtime.Intrinsics.Vector128`1[Byte], 16> V45 tmp38        ud:3->4
N001 (  1,  1) [001404] -------------             \--*  LCL_VAR   long   V69 tmp62        u:2 (last use)
```
SSA was working correctly and printing that `001403` is using SSA-3 and defining SSA-4. However, this code, for some reason, was writing result as a define for SSA-3.

* Add new test cases and a fix for them.

* correct a test copy paste

* response review.

Co-authored-by: David Wrighton <[email protected]>
2021-08-24 02:59:39 -07:00
Adam Sitnik d7a7898845 Fix Length for ReadOnlySequence created out of sliced Memory owned by MemoryManager (#57479) 2021-08-16 20:12:38 +02:00
Viktor Hofer b12fa3b572 Strong name key id cleanup and pkg testing move (#57044)
* Move src/libraries/pkg/test to src/libraries/testPackages

* Remove default StrongNameKeyId Open properties
2021-08-09 19:20:11 +02:00
Adam Sitnik 200d03e289 see if GetArrayDataReference_NullInput_ThrowsNullRef passes on tvOS now, fixes #36885 (#56724) 2021-08-02 19:22:16 +02:00
Petr Onderka 95ef79a599 Corrected terminology in SequencePosition documentation (#56693) 2021-08-02 10:40:30 +02:00
Viktor Hofer a6b9a63f35 Update libraries solution and NuGet.config files (#56430)
* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen
2021-07-28 18:44:17 +02:00
Stephen Toub f3fedf9f48 Add Debug.Assert/Write{Line}If interpolated overloads 2021-07-13 10:11:51 -04:00
Stephen Toub adad29284f Add Span.TryWrite, StringBuilder.Append, and String.Create interpolated strings support 2021-07-13 10:11:51 -04:00
Günther Foidl 738b09bee3 Use inline Vector{128|256}.Create for constants (#54827)
* Used VectorXYZ.Create for constants in Base64

* Used VectorXYZ.Create for constants in BitArray

* Remove conditional compilation

It's only built for NetCoreAppCurrent, so no need to special case older runtimes.
2021-07-12 16:53:50 +00:00
Levi Broderick ad41de4096 Add string.ReplaceLineEndings and MemoryExtensions.EnumerateLines (#53115) 2021-06-07 13:29:51 -07:00
Levi Broderick 5a1b8223da Reduce worst-case alg complexity of MemoryExtensions.IndexOfAny (#53652) 2021-06-03 22:48:54 -07:00
Levi Broderick 3e1ddb05cd Add MemoryMarshal.GetArrayDataReference(Array) (#53562) 2021-06-03 00:46:51 -07:00
Levi Broderick b759ac9716 Expose Array.Clear(Array) as public API (#53388) 2021-05-27 21:08:53 -07:00
Levi Broderick 73162b445f Reintroduce EnumerateRunes tests (#53114) 2021-05-24 09:33:06 +02:00
5297337e5b [iOS][libraries] Skip failing iOS tests with ActiveIssues and proj level skips (#51491)
In effort to assess the state of the iOS library tests, a number of tests will be skipped

Test suites that crash, hang, or have a significant number of failures (mostly 20+ failing unique test methods) are skipped on at the `tests.proj` level. Otherwise, `[ActiveIssue]` attributes have been attached to either the individual test methods that fail or the entire class if the whole test class fails. Any pre-existing `ActiveIssue` attribute associated with iOS had been reassessed to either remain or be closed.

A few test suites have been skipped because they fail with some form of `PlatformNotSupportedException`. `[SkipOnPlatform]` attributes are attached to the failing test methods.

All of the Issues can be tracked at https://github.com/dotnet/runtime/projects/48#column-9236436

The ActiveIssues and `tests.proj` exclusions have been tested on https://github.com/dotnet/runtime/pull/49917 as well.

-----------
This PR makes the following changes in the following files:
`src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj` - Removed `$(NetCoreAppCurrent)-iOS` from target frameworks as it is stated to currently only supported on Windows.

`src/libraries/tests.proj` - Update the test suites that need to be skipped at the project level, reducing the number and categorizing as a skip due to PNSE, a skip due to numerous failures, and a skip due to the suite crashing.

The remaining files changed are either:
`[ActiveIssue("<issue-url>", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]`
`[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]`

Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Tammy Qiu <[email protected]>
2021-05-12 17:40:55 +02:00
Kuinox 3297e7e018 Now that we dont leak the SequencePosition flags anymore, we dont need to bitmask the arguments before processing. (#49921) 2021-05-08 21:01:01 -07:00
Zoltan Varga 8f3ac9bac0 [mono] Add a null check to Array.GetRawArrayData (), its needed on platforms (#52355)
which use explicit null checks.

Fixes https://github.com/dotnet/runtime/issues/50960.
2021-05-06 04:36:37 -04:00
Ankit JainandLarry Ewing fa7c6a93a8 [wasm][aot] Disable failing AOT tests, to get a green build (#51724)
Co-authored-by: Larry Ewing <[email protected]>
2021-04-27 01:55:45 -04:00
df6da13870 Add Array.GetMaxLength<T> (#43301)
* Add Array.GetMaxLength<T> implementation.

* Implement Array.MaxLength and fix all remaining references

* Apply suggestions from code review

Co-authored-by: Jan Kotas <[email protected]>

* Apply suggestions from code review

Co-authored-by: Jan Kotas <[email protected]>

* Update src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs

Co-authored-by: Jan Kotas <[email protected]>

Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
2021-04-17 08:08:56 -04:00
Levi Broderick fbd3b980d9 Optimize Span<T>.Fill implementation (#51365) 2021-04-17 01:29:50 -07:00
Stephen Toub 0c793920f6 Clean up string formatting in a variety of places (#50267)
Mostly just replacing string.Format calls with equivalent interpolated string uses.  In some cases, I replaced lots of string creations with a StringBuilder or equivalent.
2021-04-04 23:16:23 -04:00
Ulrich Weigand 11bd0defb0 Big-endian fix: Base64Encoder (#49814)
* Take byte order into accout when packing characters into an int
2021-03-19 07:54:19 -07:00
Kuinox 29dbd3249f ReadOnlySequence: Don't leak the flags that are on _startInteger and _endInteger. (#47969)
* ReadOnlySequence: Don't leak the flags that are on _startInteger and _endInteger.

* Typo fix.

* Added more tests + review fixes.
2021-03-17 10:16:30 +01:00
Ulrich Weigand 21d8418a93 Big-endian test case fixes: System.Memory tests (#49690)
* Fix endian assumptions in preparing input byte patterns

* Enable tests that were disabled on big-endian systems
2021-03-16 09:45:24 -04:00
Stephen Toub 831c061e03 Add new MemoryExtensions.SequenceEqual overloads (#48677)
* Add new MemoryExtensions.SequenceEqual overloads

* Use MemoryExtensions.SequenceEqual in Enumerable.SequenceEqual

* Use MemoryExtensions.SequenceEqual in a few more places
2021-02-26 14:21:44 -05:00
Stephen Toub 66a5cd79d7 Enable SequenceMarshal to be trimmed from default Blazor wasm app (#47879) 2021-02-04 22:36:58 -05:00
Stephen Toub 2b0e2785e5 Use [NotNullWhen(true)] in more places (#47598)
* Use [NotNullWhen(true)] in more places

Did a quick search/audit for methods that returned bool and took nullable object as the first input, and added [NotNullWhen(true)] where it was obviously correct.

* Address PR feedback
2021-01-30 06:09:28 -05:00
Stephen Toub a10c2e6ebd Add MemoryMarshal.CreateReadOnlySpanFromNullTerminated (#47539) 2021-01-29 22:42:17 -05:00
Steve Harter 5175f6d139 Avoid OutOfMemoryException in some test environments (#45710) 2021-01-07 17:54:01 -06:00
Jan Kotas 10381a2cdc Find&Replace coreclr/src -> coreclr (#45761) 2020-12-08 10:40:17 -08:00
Günther Foidl 1a1ad94328 Removed thread-safety from SequenceReader (#45437)
As it's a ref-struct and thus stack-only there's no need to have any guarantees for thread-safety and atomicity.
2020-12-02 10:20:48 +01:00
xtqqczzeandStephen Toub 1edc35f851 Use AsSpan/AsMemory (start, length) (#45310)
* Use AsSpan(start, length)

Replace `AsSpan().Slice(start, length)` with `AsSpan(start, length)`

* Use AsMemory(start, length)

Replace `AsMemory().Slice(start, length)` with `AsMemory(start, length)`

* Apply suggestions from code review

Co-authored-by: Stephen Toub <[email protected]>

Co-authored-by: Stephen Toub <[email protected]>
2020-11-30 06:26:17 -05:00
Viktor Hofer ed295782bf Add workflow to update solution files with SlnGen and update them initially (#44703)
* Add slngen infra

* Update all solution files
2020-11-17 18:23:30 +01:00
Stephen Toub 7b93881c6c Delete stale comment about dotnet/roslyn#30797 2020-11-08 21:17:20 -05:00
Stephen Toub e8339af091 Remove some unnecessary unsafe usage (#43430) 2020-10-16 22:24:20 -04:00
Steve Harter 035b729d82 Improve ArrayBufferWriter re-alloc perf when size is > int.MaxSize / 2 (#42950) 2020-10-14 14:55:42 -05:00
Sergey Andreenko dff745d016 Disable ArrayBufferWriterTests.Advance with JitStress. (#42674)
* Disable ArrayBufferWriterTests.Advance with JitStress.

Issue #42517

* Try to disable broader.
2020-09-25 09:10:35 -07:00
Huo YaoyuanandJan Kotas 393c1b2067 Add methods to manipulate Half in binary (#40882)
* Expose HalfToInt16Bits and Int16BitsToHalf.

* Use HalfToInt16Bits and Int16BitsToHalf in tests.

* Add and expose BinaryPrimitive Half overloads.

* Test BinaryPrimitive Half overloads.

* Add and expose BinaryReader/Writer Half overloads.

* Test BinaryReader/Writer Half overloads.

Co-authored-by: Jan Kotas <[email protected]>
2020-09-01 13:17:28 -07:00
Marco Rossignoli 2d93df68bc Implement ReadOnlySequence<T>.GetPosition(SequencePosition) (#771), fixes #27158 2020-08-17 14:51:16 +02:00
Stephen Toub e7204f5d6f Use T? for unconstrained nullable types (#40197)
* Temporarily upgrade compiler version for T? support

* Use T? for unconstrained nullable types
2020-08-07 11:25:42 -04:00
Larry Ewing 5f51b774e2 [browser] Remove ActiveIssue from BinaryPrimitives_StaticWithSpanArgument (#40235) 2020-08-02 10:07:16 +02:00
Viktor Hofer 809a06f451 Remove depprojs in favor of PackageReferences (#35606)
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
2020-07-23 17:20:26 +02:00