platform/upstream/dotnet/runtime.git
4 years agoUpdate SDK and remove RID calculation in favor of RuntimeInformation (#35538)
Viktor Hofer [Mon, 4 May 2020 09:45:15 +0000 (11:45 +0200)]
Update SDK and remove RID calculation in favor of RuntimeInformation (#35538)

* Remove GetTargetMachineInfo from runtime

* Update bootstrapped SDK

* Remove unused prop

* Rename RuntimeRID to HostRuntimeIdentifier

* Remove yml tmp copying

* Update SDK

* Move RuntimeOS into libraries

* Fix RuntimeOS move

4 years ago[interp] Move label outside of main loop (#35778)
Vlad Brezae [Mon, 4 May 2020 09:23:59 +0000 (12:23 +0300)]
[interp] Move label outside of main loop (#35778)

Wasm has control flow limitations which don't go well with gotos. Move label outside of main loop because it translates to very poor wasm code. Other gotos don't seem to negatively impact instruction dispatch code, so leave them alone, for now ..

4 years agoIncomplete read ordering in CastCache::Get (#35597)
Vladimir Sadov [Mon, 4 May 2020 00:10:09 +0000 (17:10 -0700)]
Incomplete read ordering in CastCache::Get (#35597)

* Incomplete read ordering in CastCache::Get

* Use LoadBarrier on the managed side as well.

* Rename to ReadMemoryBarrier

* PR feedback in the JIT

4 years agoFix ManagedWebSocket.CloseAsync cancellation (#35715)
Stephen Toub [Sun, 3 May 2020 21:49:22 +0000 (17:49 -0400)]
Fix ManagedWebSocket.CloseAsync cancellation (#35715)

We allow at most one pending receive operation on a web socket, and CloseAsync needs to both send and receive, so if there's a pending receive already, it just reuses / waits for that existing one, which records if it sees a close frame.  However, if the close operation is initiated with a cancellation token that's different from the cancellation token the receive operation was initiated with, the close won't respect the supplied cancellation token because it's just waiting on the existing receive.  The fix is simply to register with this new cancellation token as well when there's an existing receive that we wait on.

4 years agoAdd error handling in build.sh (#35774)
Viktor Hofer [Sun, 3 May 2020 19:28:25 +0000 (21:28 +0200)]
Add error handling in build.sh (#35774)

Also pass help subset if it isn't set to invoke the help message.

4 years agoAddress the System.Diagnostics Feedback (#35582)
Tarek Mahmoud Sayed [Sun, 3 May 2020 19:18:19 +0000 (12:18 -0700)]
Address the System.Diagnostics Feedback (#35582)

* Address the System.Diagnostics Feedback

* Address the feedback of the feedback :-)

* Use lock instead of InterlockedExchange+SpinWait

* Remove System.Linq usage

* More feedback addressing

* Fix compilation

4 years agoSpanHelpers use nuint rather than byte* and IntPtr (#35765)
Ben Adams [Sun, 3 May 2020 18:41:25 +0000 (19:41 +0100)]
SpanHelpers use nuint rather than byte* and IntPtr (#35765)

* SpanHelpers use nuint rather than byte* and IntPtr

* uint cast BitOperations

* Cast to uint before casting to nuint

4 years agoParallelize epoll events on thread pool and process events in the same thread (#35330)
Koundinya Veluri [Sun, 3 May 2020 18:13:19 +0000 (14:13 -0400)]
Parallelize epoll events on thread pool and process events in the same thread (#35330)

* Parallelize epoll events on thread pool and process events in the same thread

* Use interlocked write instead of volatile write

* Upon epoll notification for reads and writes to a socket, queue read work and process write work in same thread

* Readonly for Event struct and rename struct to SocketIOEvent

* Track and speculatively handle epoll events for synchronous operations on the epoll thread

* Prevent event scheduling threads from becoming long-running

* Non-speculatively schedule a work item to process epoll events upon first dequeue, delegating scheduling of more work items to other threads

4 years ago[Wasm] Additional signatures for SkiaSharp interop (#35595)
monojenkins [Sun, 3 May 2020 17:14:33 +0000 (13:14 -0400)]
[Wasm] Additional signatures for SkiaSharp interop (#35595)

This change adds the set of signatures required for SkiaSharp to work untouched using the signatures already provided for the existing platform.

This change should not be required, as it is very specific to a library set. The m2n generator should allow for an external set of cookies, provided by the additional libraries linked by the packager. See https://github.com/mono/mono/issues/19670 for a more detailed issue on a possible solution.

/cc @mattleibow

---

Here's the list of enabled methods by this change:

```
VIIFFII :
System.Void SkiaSharp.SkiaApi::sk_canvas_draw_arc(System.IntPtr,SkiaSharp.SKRect*,System.Single,System.Single,System.Boolean,System.IntPtr)
VIFFFI :
System.Void SkiaSharp.SkiaApi::sk_canvas_draw_circle(System.IntPtr,System.Single,System.Single,System.Single,System.IntPtr)
VIFFFFI :
System.Void SkiaSharp.SkiaApi::sk_canvas_draw_line(System.IntPtr,System.Single,System.Single,System.Single,System.Single,System.IntPtr)
VIFFI :
System.Void SkiaSharp.SkiaApi::sk_canvas_draw_point(System.IntPtr,System.Single,System.Single,System.IntPtr)
VIFI :
System.Void SkiaSharp.SkiaApi::sk_codec_get_scaled_dimensions(System.IntPtr,System.Single,SkiaSharp.SKSizeI*)
IIIIIFII :
System.IntPtr SkiaSharp.SkiaApi::sk_font_break_text(System.IntPtr,System.Void*,System.IntPtr,SkiaSharp.SKTextEncoding,System.Single,System.Single*,System.IntPtr)
FII :
System.Single SkiaSharp.SkiaApi::sk_font_get_metrics(System.IntPtr,SkiaSharp.SKFontMetrics*)
VIIIIF :
System.Void SkiaSharp.SkiaApi::sk_font_get_xpos(System.IntPtr,System.UInt16*,System.Int32,System.Single*,System.Single)
FIIIIII :
System.Single SkiaSharp.SkiaApi::sk_font_measure_text(System.IntPtr,System.Void*,System.IntPtr,SkiaSharp.SKTextEncoding,SkiaSharp.SKRect*,System.IntPtr)
VIIIFFII :
System.Void SkiaSharp.SkiaApi::sk_text_utils_get_path(System.Void*,System.IntPtr,SkiaSharp.SKTextEncoding,System.Single,System.Single,System.IntPtr,System.IntPtr)
IFFFFIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_arithmetic(System.Single,System.Single,System.Single,System.Single,System.Boolean,System.IntPtr,System.IntPtr,System.IntPtr)
IIIFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_distant_lit_diffuse(SkiaSharp.SKPoint3*,System.UInt32,System.Single,System.Single,System.IntPtr,System.IntPtr)
IIIFFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_distant_lit_specular(SkiaSharp.SKPoint3*,System.UInt32,System.Single,System.Single,System.Single,System.IntPtr,System.IntPtr)
IFFFFIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_drop_shadow(System.Single,System.Single,System.Single,System.Single,System.UInt32,SkiaSharp.SKDropShadowImageFilterShadowMode,System.IntPtr,System.IntPtr)
IIIFFIIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_matrix_convolution(SkiaSharp.SKSizeI*,System.Single*,System.Single,System.Single,SkiaSharp.SKPointI*,SkiaSharp.SKMatrixConvolutionTileMode,System.Boolean,System.IntPtr,System.IntPtr)
IIIFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_point_lit_diffuse(SkiaSharp.SKPoint3*,System.UInt32,System.Single,System.Single,System.IntPtr,System.IntPtr)
IIIFFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_point_lit_specular(SkiaSharp.SKPoint3*,System.UInt32,System.Single,System.Single,System.Single,System.IntPtr,System.IntPtr)
IIIFFIFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_spot_lit_diffuse(SkiaSharp.SKPoint3*,SkiaSharp.SKPoint3*,System.Single,System.Single,System.UInt32,System.Single,System.Single,System.IntPtr,System.IntPtr)
IIIFFIFFFII :
System.IntPtr SkiaSharp.SkiaApi::sk_imagefilter_new_spot_lit_specular(SkiaSharp.SKPoint3*,SkiaSharp.SKPoint3*,System.Single,System.Single,System.UInt32,System.Single,System.Single,System.Single,System.IntPtr,System.IntPtr)
FIFFF :
System.Single SkiaSharp.SkiaApi::sk_3dview_dot_with_normal(System.IntPtr,System.Single,System.Single,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_3dview_translate(System.IntPtr,System.Single,System.Single,System.Single)
VIFFI :
System.Void SkiaSharp.SkiaApi::sk_matrix_map_vector(SkiaSharp.SKMatrix*,System.Single,System.Single,SkiaSharp.SKPoint*)
VIFFI :
System.Void SkiaSharp.SkiaApi::sk_matrix_map_xy(SkiaSharp.SKMatrix*,System.Single,System.Single,SkiaSharp.SKPoint*)
FIII :
System.Single SkiaSharp.SkiaApi::sk_matrix44_get(System.IntPtr,System.Int32,System.Int32)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_post_scale(System.IntPtr,System.Single,System.Single,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_post_translate(System.IntPtr,System.Single,System.Single,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_pre_scale(System.IntPtr,System.Single,System.Single,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_pre_translate(System.IntPtr,System.Single,System.Single,System.Single)
VIIIF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_set(System.IntPtr,System.Int32,System.Int32,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_set_scale(System.IntPtr,System.Single,System.Single,System.Single)
VIFFF :
System.Void SkiaSharp.SkiaApi::sk_matrix44_set_translate(System.IntPtr,System.Single,System.Single,System.Single)
IIIIIF :
System.Boolean SkiaSharp.SkiaApi::sk_paint_get_fill_path(System.IntPtr,System.IntPtr,System.IntPtr,SkiaSharp.SKRect*,System.Single)
VIIFF :
System.Void SkiaSharp.SkiaApi::sk_path_add_arc(System.IntPtr,SkiaSharp.SKRect*,System.Single,System.Single)
VIFFFI :
System.Void SkiaSharp.SkiaApi::sk_path_add_circle(System.IntPtr,System.Single,System.Single,System.Single,SkiaSharp.SKPathDirection)
VIFFFIIFF :
System.Void SkiaSharp.SkiaApi::sk_path_arc_to(System.IntPtr,System.Single,System.Single,System.Single,SkiaSharp.SKPathArcSize,SkiaSharp.SKPathDirection,System.Single,System.Single)
VIFFFIIFF :
System.Void SkiaSharp.SkiaApi::sk_path_rarc_to(System.IntPtr,System.Single,System.Single,System.Single,SkiaSharp.SKPathArcSize,SkiaSharp.SKPathDirection,System.Single,System.Single)
IFI :
System.IntPtr SkiaSharp.SkiaApi::sk_path_effect_create_2d_line(System.Single,SkiaSharp.SKMatrix*)
IFFI :
System.IntPtr SkiaSharp.SkiaApi::sk_path_effect_create_discrete(System.Single,System.Single,System.UInt32)
IFFI :
System.IntPtr SkiaSharp.SkiaApi::sk_path_effect_create_trim(System.Single,System.Single,SkiaSharp.SKTrimPathEffectMode)
VIIFFFF :
System.Void SkiaSharp.SkiaApi::sk_rrect_set_nine_patch(System.IntPtr,SkiaSharp.SKRect*,System.Single,System.Single,System.Single,System.Single)
VIIFF :
System.Void SkiaSharp.SkiaApi::sk_rrect_set_rect_xy(System.IntPtr,SkiaSharp.SKRect*,System.Single,System.Single)
IFIII :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_lerp(System.Single,System.IntPtr,System.IntPtr,SkiaSharp.SKMatrix*)
IFFIFI :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_perlin_noise_fractal_noise(System.Single,System.Single,System.Int32,System.Single,SkiaSharp.SKSizeI*)
IFFIF :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_perlin_noise_improved_noise(System.Single,System.Single,System.Int32,System.Single)
IFFIFI :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_perlin_noise_turbulence(System.Single,System.Single,System.Int32,System.Single,SkiaSharp.SKSizeI*)
IIFIIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_radial_gradient(SkiaSharp.SKPoint*,System.Single,System.UInt32*,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,SkiaSharp.SKMatrix*)
IIFIIIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_radial_gradient_color4f(SkiaSharp.SKPoint*,System.Single,SkiaSharp.SKColorF*,System.IntPtr,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,SkiaSharp.SKMatrix*)
IIIIIIFFI :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_sweep_gradient(SkiaSharp.SKPoint*,System.UInt32*,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,System.Single,System.Single,SkiaSharp.SKMatrix*)
IIIIIIIFFI :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_sweep_gradient_color4f(SkiaSharp.SKPoint*,SkiaSharp.SKColorF*,System.IntPtr,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,System.Single,System.Single,SkiaSharp.SKMatrix*)
IIFIFIIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_two_point_conical_gradient(SkiaSharp.SKPoint*,System.Single,SkiaSharp.SKPoint*,System.Single,System.UInt32*,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,SkiaSharp.SKMatrix*)
IIFIFIIIIII :
System.IntPtr SkiaSharp.SkiaApi::sk_shader_new_two_point_conical_gradient_color4f(SkiaSharp.SKPoint*,System.Single,SkiaSharp.SKPoint*,System.Single,SkiaSharp.SKColorF*,System.IntPtr,System.Single*,System.Int32,SkiaSharp.SKShaderTileMode,SkiaSharp.SKMatrix*)
VIIIFFII :
System.Void SkiaSharp.SkiaApi::sk_textblob_builder_alloc_run(System.IntPtr,System.IntPtr,System.Int32,System.Single,System.Single,SkiaSharp.SKRect*,SkiaSharp.SKRunBufferInternal*)
VIIIFII :
System.Void SkiaSharp.SkiaApi::sk_textblob_builder_alloc_run_pos_h(System.IntPtr,System.IntPtr,System.Int32,System.Single,SkiaSharp.SKRect*,SkiaSharp.SKRunBufferInternal*)
VIIIFFIII :
System.Void SkiaSharp.SkiaApi::sk_textblob_builder_alloc_run_text(System.IntPtr,System.IntPtr,System.Int32,System.Single,System.Single,System.Int32,SkiaSharp.SKRect*,SkiaSharp.SKRunBufferInternal*)
VIIIFIII :
System.Void SkiaSharp.SkiaApi::sk_textblob_builder_alloc_run_text_pos_h(System.IntPtr,System.IntPtr,System.Int32,System.Single,System.Int32,SkiaSharp.SKRect*,SkiaSharp.SKRunBufferInternal*)
```

Co-authored-by: jeromelaban <jeromelaban@users.noreply.github.com>
4 years agoUpdate dependencies from https://github.com/dotnet/runtime-assets build 20200501...
dotnet-maestro[bot] [Sun, 3 May 2020 17:11:05 +0000 (13:11 -0400)]
Update dependencies from https://github.com/dotnet/runtime-assets build 20200501.1 (#35772)

- System.ComponentModel.TypeConverter.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.IO.Compression.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.IO.Packaging.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.Net.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.Private.Runtime.UnicodeData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.Security.Cryptography.X509Certificates.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1
- System.Windows.Extensions.TestData: 5.0.0-beta.20228.1 -> 5.0.0-beta.20251.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoFix some incorrect warnings in LiveBuilds.targets (#35770)
Hugh Bellamy [Sun, 3 May 2020 14:37:37 +0000 (14:37 +0000)]
Fix some incorrect warnings in LiveBuilds.targets (#35770)

4 years agoRemove FromAsync usage from TcpListener (#35714)
Stephen Toub [Sun, 3 May 2020 13:07:30 +0000 (09:07 -0400)]
Remove FromAsync usage from TcpListener (#35714)

4 years agoFix minor typo in comment. (#35768)
Cijo Thomas [Sun, 3 May 2020 10:33:59 +0000 (03:33 -0700)]
Fix minor typo in comment. (#35768)

4 years agoBaseline SimpleSIMDProgram failing with CG2; fix typo in build-test.cmd (#35757)
Tomáš Rylek [Sun, 3 May 2020 07:59:27 +0000 (09:59 +0200)]
Baseline SimpleSIMDProgram failing with CG2; fix typo in build-test.cmd (#35757)

4 years agoRevert "Add Reverse Diagnostics Server (#33307)" (#35767)
Jan Kotas [Sun, 3 May 2020 05:50:41 +0000 (22:50 -0700)]
Revert "Add Reverse Diagnostics Server (#33307)" (#35767)

This reverts commit 629dba55058b58a126d08fc37db30b0cfa844dde.

4 years agoEnsure the function pointer being returned is from an active method. (#35750)
Aaron Robinson [Sun, 3 May 2020 00:39:18 +0000 (17:39 -0700)]
Ensure the function pointer being returned is from an active method. (#35750)

4 years agoEnable src/JIT/Methodical/explicit/coverage tests on non-Windows (#34250)
Bruce Forstall [Sat, 2 May 2020 22:58:51 +0000 (15:58 -0700)]
Enable src/JIT/Methodical/explicit/coverage tests on non-Windows (#34250)

4 years ago[CBOR] Implement Conformance Levels (#35246)
Eirik Tsarpalis [Sat, 2 May 2020 21:34:00 +0000 (22:34 +0100)]
[CBOR] Implement Conformance Levels (#35246)

* implement writing sorted keys in maps

* rename NoConformance to NonStrict

* add tests for strict mode map writes

* extract common conformance level logic to helper class

* implement reader map conformance levels

* add missing struct labels

* NonStrict -> Lax

* implement CborWriter indefinite length conformance levels

* implement CborWriter tag conformance levels

* remove preserve float representation check

* implement CborReader integer encoding conformance

* implement CborReader indefinte-length conformance

* implement CborReader tag conformance level validation

* factor frame struct out of checkpoint struct

* use HashSet for reader key uniqueness

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Integer.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* address tuple label naming consistency

* address PR feedback

* address tuple label style

* implement appropriate rollback semantics for key conformance validation

* rename CborWriter.ToArray() => CborWriter.GetEncoding(); add a span encoding method

* implement patching for indefinite-length items

* minor CborReader string refactoring

* add support for indefinite byte string literals in reader helpers

* Implement CborReader.SkipToParent();

* add a validateConformance parameter to Skip* methods

* implement CborWriter encodeIndefiniteLengths parameter

* make ReadStartMap() and ReadStartArray() return int

* strip IndefiniteLength suffix from write methods

* replace SortedList use with HashSet

* pool key encoding range HashSets

* implement writing and reading multiple root-level values

* I am disappoint

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborConformanceLevel.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Array.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Tag.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.Map.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* address PR feedback

* clean up code and add comments; remove unneeded synchronization

* rework CborWriter map sorting implementation

* store current major type in a field

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoImprove ContinueWith perf with NotOn* options (#35575)
Stephen Toub [Sat, 2 May 2020 20:42:39 +0000 (16:42 -0400)]
Improve ContinueWith perf with NotOn* options (#35575)

* Delete dead code from Task.InternalCancel

The bCancelNonExecutingOnly argument was always false.

* Rename StandardTaskContinuation to ContinueWithTaskContinuation

* Remove unused return value from InternalCancel

* Combine two overloads

There's no point in these being separate, with one being small and only and always called from the other.

* Streamline ContinueWith completions for NotOn*

We can avoid unnecessarily instantiating the contingent properties bag, as well as a few interlocked operations.

4 years agoUse GDI+1.1 API set in Windows 8 and later (#35169)
Santiago Fernandez Madero [Sat, 2 May 2020 19:58:22 +0000 (12:58 -0700)]
Use GDI+1.1 API set in Windows 8 and later (#35169)

* Use GDI+1.1 API set in Windows 8 and later

* PR Feedback, add meaningful test

* Update System.Drawing test package from runtime-assets

* PR Feedback and skip test on full framework

4 years agoFix spurious error message in libnethost.lib scenarios (#35739)
Aaron Robinson [Sat, 2 May 2020 19:40:49 +0000 (12:40 -0700)]
Fix spurious error message in libnethost.lib scenarios (#35739)

1) Empty paths don't exist, so no attribute will be found.
2) Remove string copy.

4 years agoRemove FromAsync usage from System.Net.NetworkInformation (#35710)
Stephen Toub [Sat, 2 May 2020 19:24:59 +0000 (15:24 -0400)]
Remove FromAsync usage from System.Net.NetworkInformation (#35710)

4 years agostore current major type in a field
Eirik Tsarpalis [Sat, 2 May 2020 18:59:41 +0000 (19:59 +0100)]
store current major type in a field

4 years agorework CborWriter map sorting implementation
Eirik Tsarpalis [Sat, 2 May 2020 18:10:47 +0000 (19:10 +0100)]
rework CborWriter map sorting implementation

4 years agobuild HTTP on FreeBSD once again (#35742)
Tomas Weinfurt [Sat, 2 May 2020 16:09:57 +0000 (09:09 -0700)]
build HTTP on FreeBSD once again (#35742)

4 years agoRemove FromAsync usage from SendPacketsAsync on Unix (#35513)
Stephen Toub [Sat, 2 May 2020 16:02:25 +0000 (12:02 -0400)]
Remove FromAsync usage from SendPacketsAsync on Unix (#35513)

This call is in the Unix implementation, and the Unix implementation of DisconnectAsync just calls the synchronous Disconnect... so we can just call it directly and skip all the unnecessary layering.

4 years agoFix ZeroInit of finally vars (#35723)
Carol Eidt [Sat, 2 May 2020 15:58:57 +0000 (08:58 -0700)]
Fix ZeroInit of finally vars (#35723)

Finally vars need zero-init'ing if we are enregistering them, but they will not necessarily be live-in to the first block, so we have to take care not to zero-init its last associated register in that case.

4 years agofix handling of COMPlus_ZapDisable (#35741)
Tomas Weinfurt [Sat, 2 May 2020 09:11:44 +0000 (02:11 -0700)]
fix handling of COMPlus_ZapDisable (#35741)

4 years agoFix CoreCLR incremental builds (#35732)
Jan Kotas [Sat, 2 May 2020 07:52:34 +0000 (00:52 -0700)]
Fix CoreCLR incremental builds (#35732)

4 years agoMerge pull request #35700 from layomia/clean_up
Layomi Akinrinade [Sat, 2 May 2020 06:18:53 +0000 (02:18 -0400)]
Merge pull request #35700 from layomia/clean_up

Clean up misc areas in JsonSerializer

4 years agoSupport ARM64 HVAs in Crossgen2 (#35576)
Anton Lapounov [Sat, 2 May 2020 02:55:58 +0000 (19:55 -0700)]
Support ARM64 HVAs in Crossgen2 (#35576)

•  Change FieldLayoutAlgorithm.ComputeValueTypeShapeCharacteristics method to compute the homogeneous aggregate element type and cache it in the existing field. That allows to remove all ComputeHomogeneousFloatAggregateElementType methods.
•  Change MetadataFieldLayoutAlgorithm.ComputeHomogeneousAggregateCharacteristic to compute HVAs in addition to HFAs.
•  Change CorInfoImpl.getHFAType JIT callback to handle HVAs. Note that returning ELEMENT_TYPE_VALUETYPE indicates the TYP_SIMD16 type (see Compiler::GetHfaType).
•  Change TypeFixupSignature.EncodeTypeLayout to handle HVAs.
•  Support HVAs in the ArgIterator class.
•  Fix TransitionBlock.OffsetFromGCRefMapPos for ARM64. R2RDump used to dump incorrect offsets.
•  Use TransitionBlock.OffsetFromGCRefMapPos in GCRefMapBuilder.GetCallRefMap to simplify logic.
•  Remove ARM64 .NET Native-specific code from TransitionBlock.cs and ArgIterator.cs files.

Minor:
•  Remove a redundant GetVectorSize check in MethodTable::GetHFAType.
•  Improve an assertion in Compiler::raUpdateRegStateForArg.
•  Fix comments in JIT code.

4 years agoMove collection tests to dedicated class + more clean up
Layomi Akinrinade [Fri, 1 May 2020 17:21:21 +0000 (10:21 -0700)]
Move collection tests to dedicated class + more clean up

4 years agoFix test after TcpClient change (#35721)
Stephen Toub [Sat, 2 May 2020 00:27:00 +0000 (20:27 -0400)]
Fix test after TcpClient change (#35721)

My change to TcpClient.ConnectAsync resulted in a sporadic test failure.  ConnectAsync had been implemented in terms of Begin/EndConnect.  It would call BeginConnect, and then the callback invoked when the asynchronous operation completed would call EndConnect.  The very first thing EndConnect would do is check whether the TcpClient was disposed, and throw an ObjectDisposedException if it is, ignoring the actual result or failure in the callback.  By changing the ConnectAsync implementation to bypass Begin/EndConnect, it's also skipping that check, and so if you dispose of the TcpClient while the operation is in flight, you'll end up with a SocketError.OperationAborted SocketException (exactly what you get from Socket) rather than an ObjectDisposedException.

Since SocketException was already possible from TcpClient.ConnectAsync (and is documented as such), since we want an actual error to propagate rather than hiding it with a different one, since this is about behavior after dispose, and since this is effectively an implementation detail that was leaking out, I've opted to fix the test rather than change the implementation.

4 years ago[Arm64] Fix JIT/HardwareIntrinsics/Arm/AdvSimd tests (#35726)
Egor Chesakov [Fri, 1 May 2020 23:30:22 +0000 (16:30 -0700)]
[Arm64] Fix JIT/HardwareIntrinsics/Arm/AdvSimd tests (#35726)

* Set LargestVectorSize to 16 where it must be in GenerateTests.csx

* Update AdvSimd/

4 years agoRemove an unnecessary check from fgMakeOutgoingStructArgCopy. (#35701)
Eugene Rozenfeld [Fri, 1 May 2020 19:50:55 +0000 (12:50 -0700)]
Remove an unnecessary check from fgMakeOutgoingStructArgCopy. (#35701)

The old-style helper tail calls required the jit to copy implicit by-ref
args. After #341 we are using old-style helper tail calls only for x86,
which doesn't have implicit by-ref parameters. So the check is no longer
necessary.

This is a no-diffs cleanup change.

4 years agoFix comment on CancellationTokenRegistration.Token (#35708)
Stephen Toub [Fri, 1 May 2020 18:56:52 +0000 (14:56 -0400)]
Fix comment on CancellationTokenRegistration.Token (#35708)

4 years ago[master] Update dependencies from mono/linker dotnet/xharness (#35703)
dotnet-maestro[bot] [Fri, 1 May 2020 18:39:24 +0000 (18:39 +0000)]
[master] Update dependencies from mono/linker dotnet/xharness (#35703)

* Update dependencies from https://github.com/dotnet/xharness build 20200430.6

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20230.2 -> 1.0.0-prerelease.20230.6

* Update dependencies from https://github.com/mono/linker build 20200430.3

- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20229.1 -> 5.0.0-preview.3.20230.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoPointer types are decomposable by the JIT (#35673)
David Wrighton [Fri, 1 May 2020 17:41:15 +0000 (10:41 -0700)]
Pointer types are decomposable by the JIT (#35673)

- Fix getChildType, and  getArgType
- getArgType fix involves updating asCorInfoType to match native behavior

Fixes #34734

4 years agoClean up misc areas in JsonSerializer
Layomi Akinrinade [Wed, 29 Apr 2020 17:38:47 +0000 (10:38 -0700)]
Clean up misc areas in JsonSerializer

4 years agoAdd TBL and TBX emitter tests and make displayer always emit 16B. (#35707)
Tamar Christina [Fri, 1 May 2020 17:14:32 +0000 (18:14 +0100)]
Add TBL and TBX emitter tests and make displayer always emit 16B. (#35707)

4 years agoclean up code and add comments; remove unneeded synchronization
Eirik Tsarpalis [Fri, 1 May 2020 16:41:03 +0000 (17:41 +0100)]
clean up code and add comments; remove unneeded synchronization

4 years agoUpdate nullability.md with note about Try methods and [NotNullWhen(true)] (#35711)
Stephen Toub [Fri, 1 May 2020 15:56:39 +0000 (11:56 -0400)]
Update nullability.md with note about Try methods and [NotNullWhen(true)] (#35711)

4 years agoChange ManagedWebSocket to send pong frame for keep-alive (#35644)
Stephen Toub [Fri, 1 May 2020 15:50:02 +0000 (11:50 -0400)]
Change ManagedWebSocket to send pong frame for keep-alive (#35644)

4 years ago[eng] Fix condition on RunTestsCommand property (#35709)
Mitchell Hwang [Fri, 1 May 2020 15:27:50 +0000 (11:27 -0400)]
[eng] Fix condition on RunTestsCommand property (#35709)

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
4 years agoRemove FromAsync usage from TcpClient (#35512)
Stephen Toub [Fri, 1 May 2020 15:07:43 +0000 (11:07 -0400)]
Remove FromAsync usage from TcpClient (#35512)

4 years agoaddress PR feedback
Eirik Tsarpalis [Fri, 1 May 2020 14:40:26 +0000 (15:40 +0100)]
address PR feedback

4 years agoUpdate src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter...
Eirik Tsarpalis [Fri, 1 May 2020 14:36:40 +0000 (15:36 +0100)]
Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.Map.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoUpdate src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.cs
Eirik Tsarpalis [Fri, 1 May 2020 14:24:51 +0000 (15:24 +0100)]
Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoUpdate src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader...
Eirik Tsarpalis [Fri, 1 May 2020 14:24:08 +0000 (15:24 +0100)]
Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Tag.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years ago[mono] Pass category=failing and category=outerloop to Android and iOS (#35665)
Egor Bogatov [Fri, 1 May 2020 14:09:36 +0000 (17:09 +0300)]
[mono] Pass category=failing and category=outerloop to Android and iOS (#35665)

4 years agoUpdate src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader...
Eirik Tsarpalis [Fri, 1 May 2020 14:06:11 +0000 (15:06 +0100)]
Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Array.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoUpdate src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborConformance...
Eirik Tsarpalis [Fri, 1 May 2020 14:05:58 +0000 (15:05 +0100)]
Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborConformanceLevel.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoIntroSort minor cleanup, remove unnecessary 'hi' (#35663)
nietras [Fri, 1 May 2020 13:30:46 +0000 (15:30 +0200)]
IntroSort minor cleanup, remove unnecessary 'hi' (#35663)

* IntroSort minor cleanup, remove unnecessary 'hi'

* Apply suggestions from code review

Co-authored-by: nietras <nietras@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years ago[libraries] Build lib-runtime-packs for all of mono, not just mobile (#35295)
Mitchell Hwang [Fri, 1 May 2020 11:58:29 +0000 (07:58 -0400)]
[libraries] Build lib-runtime-packs for all of mono, not just mobile (#35295)

* [libraries] Build lib-runtime-packs for all of mono, not just mobile

* [libraries] Build lib-runtime-packs for all of mono, not just mobile

* [libraries] Remove dotnet and unnecessary files from lib-runtime-packs

* [libraries] Reinclude dotnet and other files into test host

* [libraries] Alternative to excluding dotnet and other files from lib-runtime-packs

* Undo alternative changes for exclude dotnet and other files from lib-runtime-packs

This reverts commit 8cecd66db2024b4dd859212399fb69725c29fdf2.

* BinPlace native libs + runtime into testhost for desktop mono

* Removed comment

* [libraries] Remove redundant condition from ItemGroup in SetupRuntimePackNative

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
4 years ago[wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner. (#35660)
monojenkins [Fri, 1 May 2020 08:21:12 +0000 (04:21 -0400)]
[wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner. (#35660)

It should be ran as:
mono wasm-tuner.exe --gen-interp-to-native <output file name> <extra assemblies>.

The <extra assemblies> will be searched for pinvoke methods, and their signatures
will be added to the set of supported signatures.

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years ago[Arm64] Implement ASIMD widening, narrowing, saturating intrinsics (#35612)
Egor Chesakov [Fri, 1 May 2020 02:47:01 +0000 (19:47 -0700)]
[Arm64] Implement ASIMD widening, narrowing, saturating intrinsics (#35612)

* AbsoluteDifferenceWideningLower and AbsoluteDifferenceWideningUpper

* AbsoluteDifferenceWideningLowerAndAdd and AbsoluteDifferenceWideningUpperAndAdd

* AddPairwiseWidening{Scalar}

* AddPairwiseWideningAndAdd{Scalar}

* AddSaturate{Scalar}

* AddWideningLower and AddWideningUpper

* FusedAddHalving

* FusedAddRoundedHalving

* FusedSubtractHalving

* MultiplyWideningLower and MultiplyWideningUpper

* MultiplyWideningLowerAndAdd and MultiplyWideningUpperAndAdd

* MultiplyWideningLowerAndSubtract and MultiplyWideningUpperAndSubtract

* SubtractSaturate{Scalar}

* SubtractWideningLower and SubtractWideningUpper

* AddReturningHighNarrowLower and AddReturningHighNarrowUpper

* AddReturningRoundedHighNarrowLower and AddReturningRoundedHighNarrowUpper

* SubtractReturningHighNarrowLower and SubtractReturningHighNarrowUpper

* SubtractReturningRoundedHighNarrowLower and SubtractReturningRoundedHighNarrowUpper

4 years agoStrip the ILLinkTrim.xml file from System.Private.Xml (#35547)
Eric Erhardt [Fri, 1 May 2020 01:25:41 +0000 (20:25 -0500)]
Strip the ILLinkTrim.xml file from System.Private.Xml (#35547)

* Strip the ILLinkTrim.xml file from System.Private.Xml

The two methods being preserved in System.Private.Xml (CreateSqlReader and GenerateSerializer) are large, and are not necessary when linking a mobile app. These methods only need to be preserved when linking the shared framework. When a normal app is linked, the linker is able to figure out if the two methods are necessary.

Contributes to #35199

Fix #30912

* Respond to PR feedback

- Add PreserveDependencyAttribute to SqlXml to be explicit.
- Rename ILLinkTrim.xml to ILLinkTrim_LibraryBuild.xml when it shouldn't be embedded in the resulting assembly.

4 years agoCleanup src/coreclr/src/inc/src/metadata.h (#35621)
Steve MacLean [Fri, 1 May 2020 00:18:34 +0000 (20:18 -0400)]
Cleanup src/coreclr/src/inc/src/metadata.h (#35621)

* Cleanup src/coreclr/src/inc/src/metadata.h

Remove #include of private implementation headers
Fix build breaks

* Remove stray #undef __unaligned

4 years ago[Arm64] Implement Vector64/128.CreateScalar() using AdvSimd.Insert (#35300)
Egor Chesakov [Thu, 30 Apr 2020 23:35:36 +0000 (16:35 -0700)]
[Arm64] Implement Vector64/128.CreateScalar() using AdvSimd.Insert (#35300)

4 years ago[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/xharness...
dotnet-maestro[bot] [Thu, 30 Apr 2020 21:20:03 +0000 (17:20 -0400)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/xharness (#35662)

* Update dependencies from https://github.com/dotnet/arcade build 20200428.4

- Microsoft.DotNet.XUnitExtensions: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.VersionTools.Tasks: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.ApiCompat: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Build.Tasks.Feed: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Build.Tasks.Packaging: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.CodeAnalysis: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.XUnitConsoleRunner: 2.5.1-beta.20224.11 -> 2.5.1-beta.20228.4
- Microsoft.DotNet.GenAPI: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.RemoteExecutor: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4
- Microsoft.DotNet.GenFacades: 5.0.0-beta.20224.11 -> 5.0.0-beta.20228.4

* Update dependencies from https://github.com/microsoft/vstest build 20200429-01

- Microsoft.NET.Test.Sdk: 16.7.0-preview-20200428-01 -> 16.7.0-preview-20200429-01

* Update dependencies from https://github.com/dotnet/xharness build 20200430.1

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20229.6 -> 1.0.0-prerelease.20230.1

* Update dependencies from https://github.com/dotnet/xharness build 20200430.2

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20229.6 -> 1.0.0-prerelease.20230.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoImplement TranscodingStream (#35145)
Levi Broderick [Thu, 30 Apr 2020 20:50:48 +0000 (13:50 -0700)]
Implement TranscodingStream (#35145)

This is a streaming analog to the one-shot Encoding.Convert method.

4 years agoFeedback from 3.1 amd64InstrDecode review (#35670)
Steve MacLean [Thu, 30 Apr 2020 20:35:49 +0000 (16:35 -0400)]
Feedback from 3.1 amd64InstrDecode review (#35670)

* Feedback from 3.1 amd64InstrDecode review

* More feedback and cleanup

* One more

4 years agoRemove unused library definition (#35668)
Steve MacLean [Thu, 30 Apr 2020 20:09:21 +0000 (16:09 -0400)]
Remove unused library definition (#35668)

4 years agoimprove resiliency of process tests (#35584)
Tomas Weinfurt [Thu, 30 Apr 2020 19:16:33 +0000 (12:16 -0700)]
improve resiliency of process tests (#35584)

* impove resiliency of process tests

* feedback from review

* dispose process

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoI am disappoint
Eirik Tsarpalis [Thu, 30 Apr 2020 18:44:29 +0000 (19:44 +0100)]
I am disappoint

4 years agoimplement writing and reading multiple root-level values
Eirik Tsarpalis [Thu, 30 Apr 2020 18:32:22 +0000 (19:32 +0100)]
implement writing and reading multiple root-level values

4 years agodisable LZCNT in crossgen (#35598)
Clinton Ingram [Thu, 30 Apr 2020 17:24:54 +0000 (10:24 -0700)]
disable LZCNT in crossgen (#35598)

Now that BitOperations.TrailingZeroCount has a fallback to BSR, the cost of querying Lzcnt.IsSupported before using LZCNT is higher than simply using the fallback. This is a situation very specific to LZCNT because it's most often a one-and-done instruction and the fallback is only very marginally slower.

Note that this change applies only to crossgen, as the hardware intrinsic model differs for crossgen2 and it was decided that this change isn't appropriate for that different model.

4 years agoDon't notify crossgen2 about Vector<T> size when not needed (#34614)
David Wrighton [Thu, 30 Apr 2020 17:17:12 +0000 (10:17 -0700)]
Don't notify crossgen2 about Vector<T> size when not needed (#34614)

- Stop notifying  about usage status of AVX2 when using isSubRegisterSIMDType
- This allows use of the Vector2/3/4 simd types in crossgen'd code without fixing whether or not Avx2 is required

4 years agoAdd VectorTableList and TableVectorExtension intrinsics (#35600)
Tamar Christina [Thu, 30 Apr 2020 17:02:03 +0000 (18:02 +0100)]
Add VectorTableList and TableVectorExtension intrinsics (#35600)

4 years agoSet charset in editorconfig for .csproj (#35634)
Eric Erhardt [Thu, 30 Apr 2020 14:54:26 +0000 (09:54 -0500)]
Set charset in editorconfig for .csproj (#35634)

* Add editorconfig charset for csproj files.

This stops VS from inserting a BOM in these files.

* Removing BOM from .csproj files.

4 years agoRun runtime tests with mono on test change. (#35604)
Nathan Ricci [Thu, 30 Apr 2020 14:50:58 +0000 (10:50 -0400)]
Run runtime tests with mono on test change. (#35604)

 Adding tests or modifyig build-test.sh will run runtime tests on mono (in addition to coreclr).

4 years agoUpdate dependencies from https://github.com/dotnet/xharness build 20200429.6 (#35659)
dotnet-maestro[bot] [Thu, 30 Apr 2020 12:22:02 +0000 (14:22 +0200)]
Update dependencies from https://github.com/dotnet/xharness build 20200429.6 (#35659)

4 years agoDisable a few executables if DISABLE_EXECUTABLES is defined. (#35653)
monojenkins [Thu, 30 Apr 2020 12:19:27 +0000 (08:19 -0400)]
Disable a few executables if DISABLE_EXECUTABLES is defined. (#35653)

4 years agoAdd new unit test demonstrating a JIT crash in Crossgen2 build mode (#35623)
Tomáš Rylek [Thu, 30 Apr 2020 10:53:30 +0000 (12:53 +0200)]
Add new unit test demonstrating a JIT crash in Crossgen2 build mode (#35623)

4 years agoIntegrate Android into /t:Test (#35640)
Egor Bogatov [Thu, 30 Apr 2020 09:44:50 +0000 (12:44 +0300)]
Integrate Android into /t:Test (#35640)

Integrate Android into the "Test" workflow, e.g.:
```
./build.sh -os Android -arch arm64 -subset Mono+Libs

cd src/libraries/System.Buffers/tests

dotnet build /p:TargetOS=Android /p:TargetArchitecture=arm64 /t:Test
```
^ should run tests for any test suite on an active device or emulator.

4 years ago[master] Update dependencies from 5 repositories (#35567)
dotnet-maestro[bot] [Thu, 30 Apr 2020 08:40:47 +0000 (10:40 +0200)]
[master] Update dependencies from 5 repositories (#35567)

4 years agoDisable two failing tests. (#35652)
Sergey Andreenko [Thu, 30 Apr 2020 07:37:26 +0000 (00:37 -0700)]
Disable two failing tests. (#35652)

4 years agoFix compFastTailCalls check. (#35596)
Eugene Rozenfeld [Thu, 30 Apr 2020 07:22:19 +0000 (00:22 -0700)]
Fix compFastTailCalls check. (#35596)

compFastTailCalls is true if COMPlus_FastTailCalls is not 0.
It was introduced in #341 to help with testing:
setting COMPlus_FastTailCalls to 0 forces all tail-prefixed
calls to be dispatched via helpers.

This fixes a subtle bug with checking compFastTailCalls:
it needs to be checked after `fgInitargInfo` has been called in
`fgCanFastTailCall`. `fgInitArgInfo` adds the stub address for VSD calls
and `fgMorphTailCallViaHelpers` then removes it.

This change also factors out the logic for checking whether the call
has byref parameters that must be copied by the caller.

4 years agoBaseline profiler/rejit/rejit/rejit.cmd (#35641)
Simon Nattress [Thu, 30 Apr 2020 06:53:34 +0000 (23:53 -0700)]
Baseline profiler/rejit/rejit/rejit.cmd (#35641)

Related issue: https://github.com/dotnet/runtime/issues/35639

4 years agoRemove problematic #undef _ASSERTE (#35630)
Steve MacLean [Thu, 30 Apr 2020 03:20:37 +0000 (23:20 -0400)]
Remove problematic #undef _ASSERTE (#35630)

4 years agoRemove HW_Flag_UnfixedSIMDSize (#35594)
Egor Chesakov [Thu, 30 Apr 2020 02:40:29 +0000 (19:40 -0700)]
Remove HW_Flag_UnfixedSIMDSize (#35594)

* Remove HW_Flag_UnfixedSIMDSize usages in hwintrinsiclistarm64.h

* Remove HW_Flag_UnfixedSIMDSize usages in hwintrinsiclistxarch.h

* Remove HW_Flag_UnfixedSIMDSize and HWIntrinsicInfo::HasFixedSimdSize() in hwintrinsic.cpp hwintrinsic.h

* Change HWIntrinsicInfo::simdSize type to int and remove all the casts in hwintrinsic.cpp hwintrinsic.h

4 years agoRevert "Remove obsolete managedOsxBuild et. al (#35356)" (#35647)
Steve MacLean [Thu, 30 Apr 2020 02:28:17 +0000 (22:28 -0400)]
Revert "Remove obsolete managedOsxBuild et. al (#35356)" (#35647)

This reverts commit 5b9fe8f29f0429ad410eaeefdffed59509d83176.

4 years agoRemove obsolete managedOsxBuild et. al (#35356)
Steve MacLean [Thu, 30 Apr 2020 01:43:36 +0000 (21:43 -0400)]
Remove obsolete managedOsxBuild et. al (#35356)

* Remove obsolete managedOsxBuild et. al

Remove managedOsxBuild
Remove managedTestBuildOsGroup
Remove managedTestBuildOsSubgroup

4 years agoDelete DataContractSerializer's ILLinkTrim.xml file (#35520)
Stephen Toub [Thu, 30 Apr 2020 01:25:08 +0000 (21:25 -0400)]
Delete DataContractSerializer's ILLinkTrim.xml file (#35520)

The whole assembly isn't being trimmed:
```
    <!-- Too much private reflection. Do not bother with trimming -->
    <ILLinkTrimAssembly>false</ILLinkTrimAssembly>
```

(On top of that, the set_Option that's being kept here is only set via reflection by test code that's not actually built today; it's guarded behind a compilation constant that's not set.)

4 years agoUpdate link from corefx to runtime (#35633)
Jeremy Barton [Thu, 30 Apr 2020 01:23:33 +0000 (18:23 -0700)]
Update link from corefx to runtime (#35633)

4 years agohandle UnauthorizedAccessException from mmap on OSX (#35619)
Tomas Weinfurt [Thu, 30 Apr 2020 01:23:19 +0000 (18:23 -0700)]
handle UnauthorizedAccessException from mmap on OSX (#35619)

* handle UnauthorizedAccessException on OSX

* update SkipTestException text

* add comments

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoInvalid derivation of fixed fractionDigits (#34973)
mrj001 [Wed, 29 Apr 2020 23:13:46 +0000 (17:13 -0600)]
Invalid derivation of fixed fractionDigits (#34973)

* Added code to throw XmlSchemaException if the derived type attempts to alter the fixed value of fractionDigits from the base type.

4 years agoAdd OS loader relocation type statistics to Crossgen2 map file (#35587)
Tomáš Rylek [Wed, 29 Apr 2020 21:18:28 +0000 (23:18 +0200)]
Add OS loader relocation type statistics to Crossgen2 map file (#35587)

4 years agoFix NeedsAlignedBaseOffset for composite R2R (#35231)
David Wrighton [Wed, 29 Apr 2020 20:13:47 +0000 (13:13 -0700)]
Fix NeedsAlignedBaseOffset for composite R2R (#35231)

- Syncronize and correct NeedsAlignedBaseOffset
  - Crossgen2 and the runtime had different models for when the base type size needed to be aligned up
  - This caused issues for composite crossgen2 builds as the logic was heavily module focussed
  - Also, the IsInSameVersionBubble logic was non-functional for composite build

The new algorithm is similar to the old normal R2R rule, with the extension that alignment isn't required in the case of a type which has layout dependent on multiple modules if all of the modules involved are part of the same compilation. (Thus composite compilation is slightly more optimized).

The other rule which must be enforced to allow for inputbubble compilation is that all assemblies depended on by an input bubble compilation must be R2R compiled.

- Add testing for many different variations of compiling the tests with
crossgen, crossgen2, and crossgen2 with input bubble enabled/disable and various composite compilation arrangements.

- Fix R2RDump for composite images
- Fix R2RDump for various fixup types

4 years agopool key encoding range HashSets
Eirik Tsarpalis [Wed, 29 Apr 2020 20:05:23 +0000 (21:05 +0100)]
pool key encoding range HashSets

4 years agoImplement Vector{Size}<T>.AllBitsSet (#33924)
Ganbarukamo41 [Wed, 29 Apr 2020 19:32:49 +0000 (04:32 +0900)]
Implement Vector{Size}<T>.AllBitsSet (#33924)

4 years agoSimple formatting cleanup over Uri (#31874)
Miha Zupan [Wed, 29 Apr 2020 19:19:30 +0000 (21:19 +0200)]
Simple formatting cleanup over Uri (#31874)

* Simple formatting cleanup over Uri

* More Uri test cleanup

* Address pr feedback

4 years agoreplace SortedList use with HashSet
Eirik Tsarpalis [Wed, 29 Apr 2020 19:12:01 +0000 (20:12 +0100)]
replace SortedList use with HashSet

4 years agoCheck if PortableThreadPoolEventSource is enabled before logging (#8117) (#35608)
Jan Kotas [Wed, 29 Apr 2020 18:48:38 +0000 (11:48 -0700)]
Check if PortableThreadPoolEventSource is enabled before logging (#8117) (#35608)

Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
4 years agoOptimize Uri.GetHashCode (#32713)
Miha Zupan [Wed, 29 Apr 2020 17:50:15 +0000 (19:50 +0200)]
Optimize Uri.GetHashCode (#32713)

* Optimize Uri.GetHashCode

* Don't use case-insensitive string hashing when not necessary

* Don't expect Uri.GetHashCode to always be case-insensitive in tests

* Correct Uri.Equals test

Hash codes being equal doesn't mean that the values are equal

* Do not cache Uri GetHashCode

* Simplify Uri.Equals test

4 years ago[mono] Add Android sample and AndroidAppBuilder task (#35483)
Egor Bogatov [Wed, 29 Apr 2020 16:34:29 +0000 (19:34 +0300)]
[mono] Add Android sample and AndroidAppBuilder task (#35483)

4 years agoFixing break on OOB System.IO.Ports package where native dependency was no longer...
Jose Perez Rodriguez [Wed, 29 Apr 2020 16:26:56 +0000 (09:26 -0700)]
Fixing break on OOB System.IO.Ports package where native dependency was no longer produced (#35591)

4 years agoDon't create duplicate ZeroInits (#35585)
Carol Eidt [Wed, 29 Apr 2020 16:17:57 +0000 (09:17 -0700)]
Don't create duplicate ZeroInits (#35585)

4 years agoFurther tuning of the CORE_ROOT folder content (#35546)
Tomáš Rylek [Wed, 29 Apr 2020 15:04:03 +0000 (17:04 +0200)]
Further tuning of the CORE_ROOT folder content (#35546)

Based on Sergey's feedback I'm putting back the alternate JITs
(linuxonjit, protononjit) as they are actively used by the JIT team
in specialized scenarios. I have also pruned the PDB subfolder -
after extensive discussions I tried to be conservative in removing
only those PDB's we believe we don't need in Helix.

Thanks

Tomas

4 years agoImprove code coverage on collections with stream-based flows (#35046)
Layomi Akinrinade [Wed, 29 Apr 2020 14:46:47 +0000 (10:46 -0400)]
Improve code coverage on collections with stream-based flows (#35046)

* Improve code coverage on collections with stream-based flows

* Address feedback & fortify tests