platform/upstream/dotnet/runtime.git
3 years agoAdded C# implementation of System.Math.ScaleB and System.MathF.ScaleB… (#42476)
Alex Covington [Mon, 25 Jan 2021 22:11:45 +0000 (14:11 -0800)]
Added C# implementation of System.Math.ScaleB and System.MathF.ScaleB… (#42476)

* Added C# implementation of System.Math.ScaleB and System.MathF.ScaleB, removed old bindings, added test cases.

* Moved tests into System.Runtime.Extensions tests.

* Removed unmanaged scalbn and scalbnf from pal and mono

* Update src/libraries/System.Private.CoreLib/src/System/Math.cs

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Styling changes.

* Conditionally include ScaleB for Mono.

* Update src/mono/mono/metadata/sysmath.c

Tabs, not spaces.

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Removing more scalb from PAL

* Completely removed ScaleB from Mono

* Cleaning up more scalbn

* Added comments for ScaleB, updated licenses for musl and Sun

* Fixed whitespace.

* Removing old references, fixing double ScaleB definition that merge didn't resolve

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
3 years agoComWrappers cleanup (#47312)
Aaron Robinson [Mon, 25 Jan 2021 21:23:35 +0000 (13:23 -0800)]
ComWrappers cleanup (#47312)

* Clean up interop shared data types with the DAC.

* Feedback from preview CR.

* Create specific CRST for the managed object wrapper map.

3 years agoUse correct CoreLib configuration for shared framework linker trimming (#45821)
Layomi Akinrinade [Mon, 25 Jan 2021 21:09:26 +0000 (13:09 -0800)]
Use correct CoreLib configuration for shared framework linker trimming (#45821)

* Use correct CoreLib configuration for shared framework linker trimming

* Add IL subdir to CoreLib path unconditionally

* Go back to using GetTargetPath, but flow rc to it

* Update CoreLibProject properties only when necessary

* Add link to CoreLib bin-placing issue and update RuntimeConfiguration in comment

3 years agoReturn accurate size of addressing mode dsp/dsp+cnst instr descriptor (#47284)
Kunal Pathak [Mon, 25 Jan 2021 20:25:03 +0000 (12:25 -0800)]
Return accurate size of addressing mode dsp/dsp+cnst instr descriptor (#47284)

* return accurate size for amd dsp and amd dsp+cnst

* fix the condition

3 years agoUpdate Environment.ProcessorCount on Windows to take into account the processor affin...
Koundinya Veluri [Mon, 25 Jan 2021 20:21:48 +0000 (12:21 -0800)]
Update Environment.ProcessorCount on Windows to take into account the processor affinity mask (#45943)

- Similarly to cases on Unixes where sched_getaffinity is available
- If `GCCpuGroup` and `Thread_UseAllCpuGroups` are both enabled, I'm not sure if the `CPUGroupInfo` count of active processors takes affinity into account as the docs are not clear, for now I'm not modifying that path until I can verify it
- Otherwise, a process that is started with a specific processor affinity mask still shows full CPU count
- This is one of the differences in the portable managed thread pool implementation, which relies on Environment.ProcessorCount, as opposed to the native thread pool, which uses the affinity mask
- After this change, in affinitized cases on Windows the behavior is consistent perf-wise with Linux in similar situations:
  - The portable thread pool uses the same worker thread count as the native thread pool
  - `Environment.ProcessorCount` returns the number of processors the the process is affinitized to, which may be less than it would have returned before

3 years agobandaid for #44072 (#47285)
John Salem [Mon, 25 Jan 2021 18:44:40 +0000 (10:44 -0800)]
bandaid for #44072 (#47285)

* real fix needs to happen in TraceEvent

3 years agoEnable COMPlus_JitDisasmWithGC with SuperPMI asm diffs (#46966)
Bruce Forstall [Mon, 25 Jan 2021 18:17:37 +0000 (08:17 -1000)]
Enable COMPlus_JitDisasmWithGC with SuperPMI asm diffs (#46966)

All SPMI asm diffs (generated using superpmi.py) will
display interleaved GC info.

Note that you can also pass the `--gcinfo` option
to get traditional end-of-code asm dump, but that also
requires adding per-instruction offset output, which can lead
to excessive textual diffs.

3 years agoFix cancellation race condition in Parallel.ForEachAsync (#47396)
Stephen Toub [Mon, 25 Jan 2021 17:00:57 +0000 (12:00 -0500)]
Fix cancellation race condition in Parallel.ForEachAsync (#47396)

If cancellation is requested at just the "wrong" time, we may end up canceling the operation but reporting it as a successful completion, due to our relying on _registration.Token being the caller-provided token, but that not being the case if cancellation was requested prior to UnsafeRegister being called, in which case it'll return a default registration.

3 years agoupdate ownership (#47414)
Jeff Schwartz [Mon, 25 Jan 2021 16:56:15 +0000 (08:56 -0800)]
update ownership (#47414)

3 years agoAdd support for Arm intrinsics Sha256 (#47337)
Fan Yang [Mon, 25 Jan 2021 16:34:17 +0000 (11:34 -0500)]
Add support for Arm intrinsics Sha256 (#47337)

* Initial change for sha256

* Handles intrinsics with 3 parameters

* Fix condition

* Revert test change to HelloWorld sample

* Update src/mono/mono/mini/mini-llvm.c

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
* Fixed format

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
3 years agoRemove -Wc++-compat option when building Mono as C++ (#47370)
monojenkins [Mon, 25 Jan 2021 14:29:57 +0000 (09:29 -0500)]
Remove -Wc++-compat option when building Mono as C++ (#47370)

It causes a build warning on some newer compilers:

```
cc1plus: warning: command line option '-Wc++-compat' is valid for C/ObjC but not for C++
```

Co-authored-by: akoeplinger <akoeplinger@users.noreply.github.com>
3 years agoAdded Span overloads for Socket.SendFile (#47230)
Günther Foidl [Mon, 25 Jan 2021 09:52:51 +0000 (10:52 +0100)]
Added Span overloads for Socket.SendFile (#47230)

* Added Span overloads for Socket.SendFile

* Updated ref

* Fixed doc comments

* Tests

* Remove test for non-blocking

Cf. https://github.com/dotnet/runtime/pull/47230#discussion_r561983960

3 years agoVectorize HexConverter.EncodeToUtf16 using SSSE3 (#44111)
Egor Bogatov [Sun, 24 Jan 2021 19:30:51 +0000 (22:30 +0300)]
Vectorize HexConverter.EncodeToUtf16 using SSSE3 (#44111)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
3 years agofix merp arm64 (#47331)
monojenkins [Sun, 24 Jan 2021 10:05:48 +0000 (05:05 -0500)]
fix merp arm64 (#47331)

<!--
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>
3 years agoMove Interlocked.CompareExchange/Exchange to shared (#47368)
Egor Bogatov [Sat, 23 Jan 2021 21:04:55 +0000 (00:04 +0300)]
Move Interlocked.CompareExchange/Exchange to shared (#47368)

* Optimize Interlocked.Exchange and Interlocked.CompareExchange for IntPtr

* Address feedback

3 years agoFixed compilation for libicu 68. (#47352)
Marie Píchová [Sat, 23 Jan 2021 21:02:51 +0000 (22:02 +0100)]
Fixed compilation for libicu 68. (#47352)

* Fixed compilation for libicu 68.

* Fixed missing include.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoFix offset + globalization issues in StringSegment (#45022)
Levi Broderick [Sat, 23 Jan 2021 19:40:51 +0000 (11:40 -0800)]
Fix offset + globalization issues in StringSegment (#45022)

3 years ago[master] Update dependencies from mono/linker (#47357)
dotnet-maestro[bot] [Sat, 23 Jan 2021 19:02:34 +0000 (19:02 +0000)]
[master] Update dependencies from mono/linker (#47357)

[master] Update dependencies from mono/linker

3 years agoUpdate area-System.DirectoryServices lead (#47369)
Marek Safar [Sat, 23 Jan 2021 17:17:50 +0000 (18:17 +0100)]
Update area-System.DirectoryServices lead (#47369)

3 years agoFix race conditions with resolving singletons in DI (#47310)
Maryam Ariyan [Sat, 23 Jan 2021 03:28:53 +0000 (22:28 -0500)]
Fix race conditions with resolving singletons in DI (#47310)

3 years agoFold casts of constants in the importer (#47133)
SingleAccretion [Sat, 23 Jan 2021 02:00:21 +0000 (05:00 +0300)]
Fold casts of constants in the importer (#47133)

* Fold casts of constants in the importer

* Do not use a separate local for the cast operand

* Do not try to access the operation that has been folded

* Condition the call to CheckDivideByConstOptimized on success of the folding

3 years agoRemove dead code around x86 delegate interop. (#47355)
Jeremy Koritzinsky [Sat, 23 Jan 2021 01:33:11 +0000 (17:33 -0800)]
Remove dead code around x86 delegate interop. (#47355)

* Remove dead code around x86 delegate interop.

* Simplify GetUMEntryThunk.

3 years agoClean up `aspnetcore` casing in ref to that repo (#47347)
Doug Bunting [Fri, 22 Jan 2021 22:43:06 +0000 (14:43 -0800)]
Clean up `aspnetcore` casing in ref to that repo (#47347)

- address difference I introduced in dotnet/aspnetcore#29511 and more
    - conflict detected in dotnet/aspnetcore#29520
- also s|aspnet/aspnetcore|dotnet/aspnetcore|

3 years agoRemove excess allocations in Uri.ReCreateParts (#34864)
Miha Zupan [Fri, 22 Jan 2021 22:35:33 +0000 (23:35 +0100)]
Remove excess allocations in Uri.ReCreateParts (#34864)

* Remove excess allocations in Uri.ReCreateParts

* Fix Compression offset

* Revert VSB optimizations

* Use noEscape.Length

* Simplify TryGetUnicodeEquivalent

* Remove ValueStringBuilderExtensions

* Index into chars instead of dest

* Remove unreachable code block

* Use StackallocThreshold constant

* Add comments about why MemoryMarshal is used to recreate the span

3 years agoDelete custom FastRandom from ThreadPool (#47338)
Stephen Toub [Fri, 22 Jan 2021 21:45:42 +0000 (16:45 -0500)]
Delete custom FastRandom from ThreadPool (#47338)

* Delete custom FastRandom from ThreadPool

- Consolidates 128/256-bit variants of Xoshiro** into the same class name
- Uses that from ThreadPool instead of its custom xorshift-based algorithm

Throughput stays the same (~2.5ns per next random value) and incurs just one additional object allocation per thread pool thread.

* Consolidate TARGET_64/32BIT DefineConstants

3 years agoUpdate dependencies from https://github.com/mono/linker build 20210122.1 (#47332)
dotnet-maestro[bot] [Fri, 22 Jan 2021 21:00:15 +0000 (21:00 +0000)]
Update dependencies from https://github.com/mono/linker build 20210122.1 (#47332)

[master] Update dependencies from mono/linker

3 years agoRefactor some HTTP remote server tests (#47252)
Geoff Kizer [Fri, 22 Jan 2021 20:43:37 +0000 (12:43 -0800)]
Refactor some HTTP remote server tests (#47252)

move existing remote server tests in HttpClientHandlerTest.cs into a new file, HttpClientHandlerTest.RemoteServer.cs

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoWindows build.cmd doesn't support -cmakeargs. (#46195)
Johan Lorensson [Fri, 22 Jan 2021 19:26:58 +0000 (20:26 +0100)]
Windows build.cmd doesn't support -cmakeargs. (#46195)

build.sh supports -cmakeargs making it is possible to pass custom
cmake arguments down to native cmake steps, but this feature is missing
on Windows when using build.cmd. Trying to do:

.\build.cmd -subset clr -c release -cmakeargs "-DFEATURE_PERFTRACING_C_LIB=1"

on Windows will result in an error since -cmakeargs is not a known command
in build.ps1.

Commit adds support for -cmakeargs in build.cmd making sure it gets
passed down to runtime build on both CoreClr as well as Mono.

3 years agoFix crash in SuperPMI PGO apis (#47305)
Bruce Forstall [Fri, 22 Jan 2021 18:56:18 +0000 (08:56 -1000)]
Fix crash in SuperPMI PGO apis (#47305)

The real fix is a trivial fix in the linked list handling
of AllocJitTempBuffer.

The rest of the changes are making the code conform more to SuperPMI
conventions, adding comments, and improving SPMI dumping.

3 years agoNameResolutionPal.Unix: fixed loss of address family information in async lookup...
Günther Foidl [Fri, 22 Jan 2021 18:08:02 +0000 (19:08 +0100)]
NameResolutionPal.Unix: fixed loss of address family information in async lookup (#47171)

* Removed dead code from SystemNative_GetHostEntryForNameAsync

* Fixed loss of address-family

3 years agoCapture AVX context when redirecting threads for suspension (#47212)
Vladimir Sadov [Fri, 22 Jan 2021 17:53:12 +0000 (09:53 -0800)]
Capture AVX context when redirecting threads for suspension (#47212)

* Save avx regs during SuspendThread

* few more changes and comments

* fix build on windows arm

* fix build on Unix

* Use new[] instead of malloc

* fix for Unix

* Use InitializeContext2 to enable context compaction.

* PR feedback

* Reverted CONTEXT_COMPLETE  change.

* Use `CopyContext` in RedirectCurrentThreadAtHandledJITCase

Co-authored-by: Manish Godse <61718172+mangod9@users.noreply.github.com>
3 years agoFaster EventSource attribute lookup (#45621)
Ben Adams [Fri, 22 Jan 2021 17:37:26 +0000 (17:37 +0000)]
Faster EventSource attribute lookup (#45621)

* Use faster single attribute lookup for Eventsource

* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Add debug assert for type

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoAdd ActivitySource.StartActivity overload and support CallerMemberNameAttribute for...
Tarek Mahmoud Sayed [Fri, 22 Jan 2021 17:23:12 +0000 (09:23 -0800)]
Add ActivitySource.StartActivity overload and support CallerMemberNameAttribute for name parameter (#47192)

3 years agoResolve ILLink warnings in System.Security.Cryptography.Algorithms
Eric Erhardt [Fri, 22 Jan 2021 17:17:03 +0000 (11:17 -0600)]
Resolve ILLink warnings in System.Security.Cryptography.Algorithms

3 years agoDisable sourcelink locally consistently (#47297)
Viktor Hofer [Fri, 22 Jan 2021 16:27:39 +0000 (17:27 +0100)]
Disable sourcelink locally consistently (#47297)

3 years agoRevert "Re-enable RunThreadLocalTest8_Values on Mono (#47277)" (#47324)
Alexander Köplinger [Fri, 22 Jan 2021 14:30:12 +0000 (15:30 +0100)]
Revert "Re-enable RunThreadLocalTest8_Values on Mono (#47277)" (#47324)

This reverts commit f3cd4c6af763d35b9633dc01729a3c02942f941d.

3 years agoMove some Threading classes over from NativeAOT (#47327)
Ryan Lucia [Fri, 22 Jan 2021 14:27:45 +0000 (09:27 -0500)]
Move some Threading classes over from NativeAOT (#47327)

This PR intentionally does not include any of the modifications on top of them or other files that will be needed to wire them up to the build.

3 years agoMisc changes from runtimelab:NativeAOT (#47323)
Michal Strehovský [Fri, 22 Jan 2021 14:26:12 +0000 (15:26 +0100)]
Misc changes from runtimelab:NativeAOT (#47323)

* Improved logger for the AOT compiler. The logic is mostly taken from IL Linker where prople spent a bunch of time on it.
* Bunch of other changes.

3 years agoDelete extraneous nullable suppression in CertificatePal.Import.cs (#47311)
Stephen Toub [Fri, 22 Jan 2021 12:28:11 +0000 (07:28 -0500)]
Delete extraneous nullable suppression in CertificatePal.Import.cs (#47311)

3 years agoSupply file version info for the jitinterface native library (#47300)
Tomáš Rylek [Fri, 22 Jan 2021 11:37:13 +0000 (12:37 +0100)]
Supply file version info for the jitinterface native library (#47300)

During my work on switching over framework library crossgenning
to use Crossgen2 I noticed that jitinterface is missing the
file version information. This change fixes the issue.

Thanks

Tomas

3 years agoResolves error in initNonPortableDistroRid when your local directory name contains...
Steve Pfister [Fri, 22 Jan 2021 11:14:29 +0000 (06:14 -0500)]
Resolves error in initNonPortableDistroRid when your local directory name contains android (#47045)

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
3 years agoParse method call chain model file and resolve methods (#47302)
Simon Nattress [Fri, 22 Jan 2021 04:57:23 +0000 (20:57 -0800)]
Parse method call chain model file and resolve methods (#47302)

* Parse method call chain model file and resolve methods
* Resolve methods from Azure profile trace building a list of caller->callees with counts to use in compilation heuristics
* Resolves the two main forms of methods we see in the traces:

```
System.Core.ni.dll!System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.__Canon,System.__Canon].MoveNext
Microsoft.Azure.Monitoring.WarmPath.FrontEnd.Middleware.SecurityMiddlewareBase`1+<Invoke>d__6[System.__Canon]!MoveNext
```

3 years agoupdate branding from alpha to preview1 (#47282)
Anirudh Agnihotry [Fri, 22 Jan 2021 04:14:18 +0000 (20:14 -0800)]
update branding from alpha to preview1 (#47282)

3 years agoExport DotNetRuntimeInfo symbol from singlefile host (#47299)
Vladimir Sadov [Fri, 22 Jan 2021 03:57:38 +0000 (19:57 -0800)]
Export DotNetRuntimeInfo symbol from singlefile host (#47299)

* Exporting DotNetRuntimeInfo from singlefilehost

* move runtimeinfo into a separate lib

* enable runtimeinfo on macOS

* export only runtimeinfo

* fix FreeBSD build

* revert DLLEXPORT change

3 years agoReact to dotnet/aspnetcore master -> main renaming (#47306)
Doug Bunting [Fri, 22 Jan 2021 02:31:36 +0000 (18:31 -0800)]
React to dotnet/aspnetcore master -> main renaming (#47306)

3 years agoFix typo in LoggerMessage.cs (#47293)
Daniel Chalmers [Fri, 22 Jan 2021 01:04:43 +0000 (19:04 -0600)]
Fix typo in LoggerMessage.cs (#47293)

'sisxth' -> 'sixth'
Fixes #47292

3 years agoReduce allocations in System.Threading.Channels for netstandard2.* and net461 (#46458)
Kornei Dontsov [Fri, 22 Jan 2021 01:02:04 +0000 (03:02 +0200)]
Reduce allocations in System.Threading.Channels for netstandard2.* and net461 (#46458)

* Reduce allocations in System.Threading.Channels for netstandard2.* and net461

System.Threading.Channels.AsyncOperation<TResult> is well optimized for .NET Core, but there are no optimizations for .NET Standard 2.0 and .NET Framework. They use the same code as .NET Standard 1.3.

* Remove execution flow suppression as redundant

* Rollback QueueUserWorkItem

3 years agoReplace two uses of TaskCreationOptions.LongRunning (#47296)
Stephen Toub [Fri, 22 Jan 2021 00:55:23 +0000 (19:55 -0500)]
Replace two uses of TaskCreationOptions.LongRunning (#47296)

3 years agoBump Linux arm64 Helix docker image (#47254)
Alexander Köplinger [Fri, 22 Jan 2021 00:46:01 +0000 (01:46 +0100)]
Bump Linux arm64 Helix docker image (#47254)

Looks like it was never bumped to bring in https://github.com/dotnet/core-eng/issues/10033#issuecomment-655807795

3 years agoOptimize Activity Ids (#46890)
Tarek Mahmoud Sayed [Thu, 21 Jan 2021 23:20:04 +0000 (15:20 -0800)]
Optimize Activity Ids (#46890)

* Optimize Activity Ids

* Generate long random numbers and make the generator object a threadstatic

* Addnew line at the end of the file

* Update the Random number generator

* Fix Full Framework failure

* Address the feedback regarding ranomizing Guid bits

* address more Feedback

* Address more feedback

3 years agoNameResolution-Tests: enable GetHostEntryAsync_InvalidHost_LogsError on Windows ...
Günther Foidl [Thu, 21 Jan 2021 22:31:41 +0000 (23:31 +0100)]
NameResolution-Tests: enable GetHostEntryAsync_InvalidHost_LogsError on Windows (#47034)

* Enable GetHostEntryAsync_InvalidHost_LogsError on Windows too

* Use WaitForErrorEventAsync instead of a naive Task.Delay

Cf. https://github.com/dotnet/runtime/pull/47034#discussion_r558728557

3 years agoMake File.Move(..., ..., overwrite: true) more efficient. (#47118)
Konstantin Gukov [Thu, 21 Jan 2021 22:04:36 +0000 (23:04 +0100)]
Make File.Move(..., ..., overwrite: true) more efficient. (#47118)

The current implementation has an inefficiency. When moving a file across volumes, and when
the target file doesn't exist, the "rename" syscall will be called twice (unsuccesfully) instead of once.

By branching on "overwrite" from the beginning, we avoid calling the first "rename" in vain.

Co-authored-by: Konstantin Gukov <kgukov@microsoft.com>
3 years agoUse CorInfoCallConvExtension throughout runtime interop code (#47251)
Jeremy Koritzinsky [Thu, 21 Jan 2021 21:57:55 +0000 (13:57 -0800)]
Use CorInfoCallConvExtension throughout runtime interop code (#47251)

* First pass to move the vm to use CorInfoCallConvExtension for all IL-stub-related calling convention needs.

* Use CorInfoCallConvExtension all the way down to the native function signature emit stage.

* PR feedback.

* Fix variable name.

* Update src/coreclr/vm/dllimport.cpp

3 years agoArm64 apple vm fixes for arg alignment. (#46665)
Sergey Andreenko [Thu, 21 Jan 2021 21:37:42 +0000 (13:37 -0800)]
Arm64 apple vm fixes for arg alignment. (#46665)

* Add `MarshalInfo::IsValueClass`.

* Add `TypeHandle* pTypeHandle` to `SizeOf`.

* Add a few asserts/start using inline function instead of macro.

* use TARGET_POINTER_SIZE instead of STACK_ELEM_SIZE.

* Use `m_curOfs` instead of `m_idxStack` in `ArgIteratorBase` on all platforms.

Before some platforms were using stackSlots, some curOfs in bytes.

* Use byte sizes and offsets in `ArgLocDesc`.

Fix arm32.

x86 fixes.

use StackSize on ArgSizes

Add `GetStackArgumentByteIndexFromOffset` and return back the old values for asserts.

another fix

* Stop using `#define STACK_ELEM_SIZE`

* Add `isFloatHfa`.

* delete checking code.

because it won't pass on arm64 apple.

* arm64 apple fixes.

* roundUp the stack size.

* Add a reflection test.

* Return byte offset from `GetNextOfs`.

It is not a complete fix for arm64 apple, but covers most cases.

* Add `FLOAT_REGISTER_SIZE`

* Use StackElemSize for ` pLoc->m_byteStackSize`.

* replace `assert` with `_ASSERTE`.

* Use `ALIGN_UP` in the code that I have changed.

* rename `m_curOfs` as `m_ofsStack`.

* delete "ceremony " from `StackElemSize`.

* Delete `cSlots` and don't call `StackElemSize` on `GetArgSize`.

* Fix an assert.

* Fix nit.

* fix wrong return for hfa<float>.

* fix nit.

* Fix crossgen job.

3 years agoLinux: don't use deprecated sysctl (#45753)
Tom Deseyn [Thu, 21 Jan 2021 21:11:49 +0000 (22:11 +0100)]
Linux: don't use deprecated sysctl (#45753)

* Linux: don't use deprecated sysctl

* Handle deprecated sysctl in coreclr, gc, corehost.

3 years agoAdd interned string support to the JS<->WASM bindings layer (#44518)
Katelyn Gadd [Thu, 21 Jan 2021 20:54:31 +0000 (12:54 -0800)]
Add interned string support to the JS<->WASM bindings layer (#44518)

This PR introduces interned string support to the bindings layer along with some related changes:
    The JS bindings layer maintains a pair of string intern tables, one mapping JS string -> managed pointer and the other mapping managed pointer -> JS string.
    Any interned managed string is automatically added to the JS intern tables when it crosses the bindings boundary, to avoid duplicate allocations + reduce time spent copying/decoding text.
    Signatures gain a new type token S which specifies that the argument is an interned string. If the string passed is not already interned, the JS bindings will automatically intern it on both sides.
    The bindings layer logic for creating a new managed string will automatically look it up in the local intern table (unless it is large) and use the existing managed string if an interned string is found.
    mono_wasm_get_obj_type and similar APIs now return a distinct type ID for interned strings. The logic for this is awkward but doing it in the driver is much faster than trying to do it from JS.
    Partial support for converting JS Symbol instances to interned managed strings in the bindings layer. I didn't finish this yet because v8 shell's Symbol support is broken, but it's a good way to achieve interning because the JS runtime exposes interning for symbols.

3 years agoRe-enable RunThreadLocalTest8_Values on Mono (#47277)
Aleksey Kliger (λgeek) [Thu, 21 Jan 2021 20:07:48 +0000 (15:07 -0500)]
Re-enable RunThreadLocalTest8_Values on Mono (#47277)

This is possibly fixed by https://github.com/dotnet/runtime/pull/44124
Since that PR mono will throw a ThreadStartException instead of an
ExecutionEngineException if thread creation fails. The threadpool
already catches ThreadStartException and can deal with thread creation failure.

Related to https://github.com/dotnet/runtime/issues/43981

3 years agoReplace HttpMethod dictionary with switch (#47281)
Stephen Toub [Thu, 21 Jan 2021 19:49:38 +0000 (14:49 -0500)]
Replace HttpMethod dictionary with switch (#47281)

3 years agoLibraries shims build fixes (#47127)
Jan Kotas [Thu, 21 Jan 2021 17:18:21 +0000 (09:18 -0800)]
Libraries shims build fixes (#47127)

* On Windows, both dynamic and static libraries are producing .lib file (export library vs. actual static library). We need to make sure that these .lib file have different name to avoid build race conditions.
* Fix System.Globalization.Native too for consistency
* Delete unnecessary ifdef

3 years agoClean up test in System.Threading to use PlatformDetection instead of PlatformSpecifi...
Kenneth Pouncey [Thu, 21 Jan 2021 17:09:07 +0000 (18:09 +0100)]
Clean up test in System.Threading to use PlatformDetection instead of PlatformSpecific. (#47260)

- Add `[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]`

3 years agoFix building symbols archive (#47271)
Alexander Köplinger [Thu, 21 Jan 2021 17:05:33 +0000 (18:05 +0100)]
Fix building symbols archive (#47271)

When passing `/p:CreateSymbolsArchive=true` the build complained about missing `PublishSymbolsToDisk` targets.

3 years ago[mbr] [wasm] Don't automatically turn off inlining (#47246)
Aleksey Kliger (λgeek) [Thu, 21 Jan 2021 17:01:40 +0000 (12:01 -0500)]
[mbr] [wasm] Don't automatically turn off inlining (#47246)

Instead of turning off inlining whenever ENABLE_METADATA_UPDATE is defined in
the code, only turn it off when MONO_METADATA_UPDATE is set in the environment.

Update the browser MBR sample to use the env var

3 years agoEventPipe C library CoreClr ep_rt_object_array_alloc should zero init. (#47111)
Johan Lorensson [Thu, 21 Jan 2021 15:33:45 +0000 (16:33 +0100)]
EventPipe C library CoreClr ep_rt_object_array_alloc should zero init. (#47111)

EventPipe C library is defensive in its type allocators:

ep_rt_object_alloc
ep_rt_object_array_alloc

meaning that they will zero init memory before returned. On Mono this is
done through use of g_new0 and on CoreClr we use C++11 zero init feature
when allocating struct (only type allocated through these functions).

On CoreClr this was only applied for ep_rt_object_alloc but not for
ep_rt_object_array_alloc meaning that ep_rt_object_array_alloc would
return arrays of allocated objects but not zero initialized.

PR makes sure we call new (nothrow) utilizing C++11's zero initialization
capabilities of non-class types without constructors.

3 years ago[aot] Avoid creating runtime invoke wrappers for methods which return a byreflike...
Zoltan Varga [Thu, 21 Jan 2021 15:06:37 +0000 (10:06 -0500)]
[aot] Avoid creating runtime invoke wrappers for methods which return a byreflike type, the return value cannot be boxed. (#47033)

3 years ago[wasm][docs] Add docs for using AOT profiler (#47170)
Tammy Qiu [Thu, 21 Jan 2021 12:05:04 +0000 (07:05 -0500)]
[wasm][docs] Add docs for using AOT profiler (#47170)

* add instructions for using profiler

* [wasm][docs] add link to wasm/build/README.md

3 years agoFix call to GcWeakPtrScanBySingleThread (#47225)
Peter Sollich [Thu, 21 Jan 2021 07:59:28 +0000 (08:59 +0100)]
Fix call to GcWeakPtrScanBySingleThread (#47225)

When running with MARK_LIST not defined, I noticed a crash due an incorrect #ifdef, which caused GcWeakPtrScanBySingleThread to be executed by multiple threads. The #endif is in the wrong place - we didn't notice because we usually have MARK_LIST defined.

3 years agoUpdate the ComWrappers API (#47073)
Aaron Robinson [Thu, 21 Jan 2021 06:29:51 +0000 (22:29 -0800)]
Update the ComWrappers API (#47073)

* Update the ComWrappers API

Add support for the new Aggregated and Unwrap flags in ComWrappers.

* ARM/ARM64 build issues.
Add missing contracts.

* Add test for unwrap logic.
Remove extra AddRef() in ComWrappers global marshalling scenario.

* Review feedback.

* Add negative test for passing non-null inner without indicating
  the scenario is for aggregation.

3 years agoOnly pass the method context when tracking transitions. (#47238)
Jeremy Koritzinsky [Thu, 21 Jan 2021 02:48:04 +0000 (18:48 -0800)]
Only pass the method context when tracking transitions. (#47238)

* Only pass the method context when tracking transitions.

* Add another separate helper for exit. use a jitflag to signify when to track transitions

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Wire up R2R helpers.

* Revert "Wire up R2R helpers."

This reverts commit 80a4749232312a89752518bcb8741a2b8e0129cc.

* Update CorInfoHelpFunc to have the new entries. Don't handle the new helpers since they won't be used.

* Simplify if check since CORProfilerTrackTransitions is process-wide.

* Remove unneeded assignment.

* Fix formatting.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoFixes DI deadlock when resolving singletons (#46157)
Maryam Ariyan [Thu, 21 Jan 2021 02:18:58 +0000 (21:18 -0500)]
Fixes DI deadlock when resolving singletons  (#46157)

3 years agoImprove Random (performance, APIs, ...) (#47085)
Stephen Toub [Thu, 21 Jan 2021 01:26:55 +0000 (20:26 -0500)]
Improve Random (performance, APIs, ...) (#47085)

* Improve Random (performance, APIs, ...)

- Changes the algorithm used by `new Random()` to be one that's smaller and faster and produces better results
- Refactors the implementation to make it internally pluggable
- Moves the existing implementation to be used when it's necessary for back compat
- Adds NextInt64 and NextSingle methods

3 years agoBump timeout of iOS job in runtime-staging.yml (#47241)
Alexander Köplinger [Thu, 21 Jan 2021 00:17:07 +0000 (01:17 +0100)]
Bump timeout of iOS job in runtime-staging.yml (#47241)

We saw it running into the 2hr timeout in https://dev.azure.com/dnceng/public/_build/results?buildId=958281&view=logs&j=8580ecfb-912a-5dbd-35ce-e64d0d51ddbf even though the build progressed fine (albeit slowly).

3 years agosrc/installer support osx-arm64 (#47247)
Steve MacLean [Wed, 20 Jan 2021 23:29:57 +0000 (18:29 -0500)]
src/installer support osx-arm64 (#47247)

3 years agoInclude crossgen2 when crossgening SPC. (#47216)
Sergey Andreenko [Wed, 20 Jan 2021 23:05:48 +0000 (15:05 -0800)]
Include crossgen2 when crossgening SPC. (#47216)

3 years ago[master] Update dependencies from mono/linker (#47108)
dotnet-maestro[bot] [Wed, 20 Jan 2021 22:22:15 +0000 (22:22 +0000)]
[master] Update dependencies from mono/linker (#47108)

[master] Update dependencies from mono/linker

 - Reflect linker changes

 - Reflect linker changes

 - Reflect linker changes

 - Merge branch 'darc-master-cda9432a-2250-4c6f-822a-6016b38faef1' of github.com:dotnet/runtime into darc-master-cda9432a-2250-4c6f-822a-6016b38faef1

 - fix msbuild logic

3 years agoUpdate SafeHandle types to have public parameterless constructors and add InitHandle...
Jeremy Koritzinsky [Wed, 20 Jan 2021 22:01:09 +0000 (14:01 -0800)]
Update SafeHandle types to have public parameterless constructors and add InitHandle API (#47189)

* Update public SafeHandle types to have public parameterless constructors.

Remove now-unneeded ILLink trim files.

Make public abstract SafeHandle constructors protected.

Remove comment on SafeWaitHandle

* Make SafeHandle constructors public for internal types.

Make internal abstract SafeHandle default constructors protected. Make non-abstract internal SafeHandles sealed when possible.

More internal SafeHandle types.

* Add new Marshal.InitHandle API.

Fix SetHandle accessibility

Fix test.

Use Marshal.InitHandle.

* PR feedback.

* Remove trailing whitespace.

3 years agodefine HttpVersion.Version30 and use where appropriate (#47208)
Geoff Kizer [Wed, 20 Jan 2021 21:37:58 +0000 (13:37 -0800)]
define HttpVersion.Version30 and use where appropriate (#47208)

* define HttpVersion.Version30 and use where appropriate

* add xmldoc to HttpVersion

* fix debug references

* readd HttpVersion30 to HttpClientHandlerTestBase

* revert changes to HttpClientHandlerTest.cs

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years ago[mono] Add basic Vector128 support for arm64. (#47028)
imhameed [Wed, 20 Jan 2021 21:12:27 +0000 (13:12 -0800)]
[mono] Add basic Vector128 support for arm64. (#47028)

This change:

- Unpacks SIMD parameters passed via multiple GPRs (`LLVMArgVtypeAsIArgs`) into
local LLVM SSA vector-typed values on function entry. The calling convention we
use on arm and arm64 has "large" value types passed in multiple GPRs when
possible, and the way this is currently encoded in the LLVM IR we emit is by
using parameters with the LLVM type `[Size x {i32 or i64}]`, where the
resulting size of this type, in bytes, is at least as large as the size of the
value type encoded within.

- Packs SIMD return values into multiple GPRs (`LLVMArgVtypeAsScalar`); the way
this is currently encoded in the LLVM IR we emit for arm64 (but not arm) is by
using a "wide" LLVM integer type (e.g. `i128`).

- Makes `OP_LDADDR` aware of our special-case handling of SIMD value types:
SIMD value types passed via an indirection (`LLVMArgVtypeAddr` or
`LLVMArgVtypeByRef`) are loaded from memory to an LLVM SSA value in the initial
basic block, but `OP_LDADDR` had previously assumed that any value type passed
via an indirection had an associated LLVM SSA value containing an indirection
rather than the actual value.

- Adds a debugging utility function (`mono_llvm_dump_type`).

- Gives greppable names to some allocas.

- Makes some formerly amd64-specific SIMD-related opcodes also work on arm64.

3 years ago[wasm][debugger][tests] Update tests to track harness changes (#46968)
Ankit Jain [Wed, 20 Jan 2021 19:45:22 +0000 (14:45 -0500)]
[wasm][debugger][tests] Update tests to track harness changes (#46968)

* [wasm][debugger][tests] Move all the tests to `SingleSessionTestBase`

And thus move to remove the use to `insp.Ready`:

So, old code:
```csharp
        [Fact]
        public async Task BrowserClose()
        {
            var insp = new Inspector();
            var scripts = SubscribeToScripts(insp);
            await Ready();
            await insp.Ready(async (cli, token) => {
                 await Assert.ThrowsAsync<WebSocketException>(async () =>
                        await SendCommandAndCheck(null, "Browser.close", null, -1, -1, null));
            });
       }
```

.. becomes:

```csharp
        [Fact]
        public async Task BrowserClose() => await Assert.ThrowsAsync<WebSocketException>(async () =>
                await SendCommandAndCheck(null, "Browser.close", null, -1, -1, null));
```

* [wasm][debugger][tests] Run `dotnet format` on the test files

* [wasm][debugger][tests] Merge SingleSessionTestBase=>DebuggerTestBase

.. since it isn't required any more.

* [wasm][debugger][tests] Remove DebugTestContext

This isn't required anymore.

* [wasm][debugger][tests] Remove unused insp.Ready method

* [wasm][debugger][tests] Re-apply old commit to expand console args

In the previous merge, this commit got lost:

```
commit 22e9f6ef0e45bba65e927341f09279a697aae56f
Author: Larry Ewing <lewing@microsoft.com>
Date:   Wed Dec 9 15:48:09 2020 -0600

    expand console arguments when writing them out (#44632)

    * expand cosole arguments when writing them out

    * Update src/mono/wasm/debugger/DebuggerTestSuite/Support.cs

    * Update src/mono/wasm/debugger/DebuggerTestSuite/Support.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
```

Update, and re-apply it.

* [wasm][debugger][tests] remove debug statement

3 years agoFix unrolling for LocateLastFoundChar and LocateLastFoundByte in SpanHelpers (#46977)
SingleAccretion [Wed, 20 Jan 2021 19:29:43 +0000 (22:29 +0300)]
Fix unrolling for LocateLastFoundChar and LocateLastFoundByte in SpanHelpers (#46977)

3 years ago[jit] Emit a null check for stelem instructions. (#46817)
Zoltan Varga [Wed, 20 Jan 2021 18:38:59 +0000 (13:38 -0500)]
[jit] Emit a null check for stelem instructions. (#46817)

Part of the fix for https://github.com/dotnet/runtime/issues/46766.

3 years agoclean up some issues in header classes around immutability and readonly fields (...
Geoff Kizer [Wed, 20 Jan 2021 18:26:54 +0000 (10:26 -0800)]
clean up some issues in header classes around immutability and readonly fields (#47205)

* clean up some issues in header classes around immutability and readonly fields

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoClassify type with empty base as non-blittable (#46769)
Adeel Mujahid [Wed, 20 Jan 2021 18:13:59 +0000 (20:13 +0200)]
Classify type with empty base as non-blittable (#46769)

* Add tests for MarshalUtils.IsBillitableType

* Classify type with empty base as non-blittable

* Add tests for IsZeroSizedReferenceType

* Rename local variables in tests

3 years agoInitial new-style iOS/tvOS cross compiler (#47184)
Jo Shields [Wed, 20 Jan 2021 17:43:27 +0000 (12:43 -0500)]
Initial new-style iOS/tvOS cross compiler (#47184)

* Allow no EMSDK for cross-compiler

* Don't try to include file not made during AOT on Browser

* Move BuildMonoCrossAOT from a bool to a Subset-esque string

* Generate wasm offsets

* Add new offset generation to non-official builds too. Oops

* Deal with default case when generating offsets only

* We override the OS, so can't switch on it

* We're being skipped again

* Grr

* Try another time. Merges passing in the night.

* Try and make the yaml consume both offsets

* Clean up last commit, which went surprisingly well

* Actually consume all offsets from parameter

* Yaml 🤷‍♂️

* It's not crossandroid any more, is it?

* Official version

* Fix typo

* Fix typo in typo

* Cleanups

* Variable rename suggestion from Alex

* More better variable names from Alex

* Initial new-style AOT for iOS. Need to disable Linux builds selectively though.

* Split Linux & Mac AOT

* fix error in official builds

3 years agoUpdate StackBehaviour.cs (#47234)
AnakinSklavenwalker [Wed, 20 Jan 2021 17:32:05 +0000 (18:32 +0100)]
Update StackBehaviour.cs (#47234)

3 years ago[Wasm] Add AOT CI Leg (#46651)
Steve Pfister [Wed, 20 Jan 2021 17:02:45 +0000 (12:02 -0500)]
[Wasm] Add AOT CI Leg (#46651)

In lieu of running all the library tests suites in AOT mode on CI (estimated to be ~36 hrs = 240 test suites * ~9min AOT time per test suite), only System.Buffers will be ran in AOT mode to standup the leg.  Once we find a more acceptable solution, the other libraries tests will be enabled.

The CI leg will start out on the staging pipeline to avoid blocking and failing the build.

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoDisable the localloc-noinit.exe test on CI, it depends on undefined behavior and...
monojenkins [Wed, 20 Jan 2021 15:47:47 +0000 (10:47 -0500)]
Disable the localloc-noinit.exe test on CI, it depends on undefined behavior and it fails on i386 linux. (#47078)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoFix wasm package build being skipped (#47227)
Jo Shields [Wed, 20 Jan 2021 14:40:11 +0000 (09:40 -0500)]
Fix wasm package build being skipped (#47227)

3 years agoUpdate comments for Socket.UseOnlyOverlappedIO (#47160)
Anton Firszov [Wed, 20 Jan 2021 14:13:36 +0000 (15:13 +0100)]
Update comments for Socket.UseOnlyOverlappedIO (#47160)

* Update UseOnlyOverlappedIO comments

* Update Socket.cs

* Update src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years ago[browser][tests][outerloop] Standup OuterLoop tests on CI (#45949)
Kenneth Pouncey [Wed, 20 Jan 2021 13:45:27 +0000 (14:45 +0100)]
[browser][tests][outerloop] Standup OuterLoop tests on CI (#45949)

* [browser][tests][outerloop] Standup OuterLoop tests on CI

* System.Collections.NonGeneric.Tests passing

* System.Console.Tests passing

* System.Diagnostics.DiagnosticSource.Tests passing

* System.Globalization.Tests passing

- See active issue https://github.com/dotnet/runtime/issues/45951

* System.IO.FileSystem.Tests passing after deactivating test cannot wait on monitors on this runtime.

* System.IO.FileSystem.Tests passing - See active issue: https://github.com/dotnet/runtime/issues/45954

* Remove fat fingered code.

* Threads not supported on Browser

* Browser does not support monitor

* Browser does not support monitor

* Browser does not support wait on monitors

* Browser does not support wait on monitors

* Add ActiveIssue for DataFlow tests TestNullTarget_CompletionNoCaching

* Add ActiveIssue for DataFlow tests

* Add ActiveIssue for DataFlow tests

* Add threading support conditional

* Change all Cannot wait on monitors on this runtime Browser platform checks to

[ConditionalXXXX(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]

As was suggested in comments

* Address review comment for monitors not supported

* Address review comments

* Add threading supported condition.

```
fail: [FAIL] System.Text.Json.Serialization.Tests.EnumConverterTests.VeryLargeAmountOfEnumsToSerialize
[08:10:56] info: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
```

3 years agoFix profiler sync issue (#47214)
David Mason [Wed, 20 Jan 2021 11:15:20 +0000 (03:15 -0800)]
Fix profiler sync issue (#47214)

3 years agoupdate profiling API status (#47217)
David Mason [Wed, 20 Jan 2021 10:22:28 +0000 (02:22 -0800)]
update profiling API status (#47217)

3 years ago[mono] Remove MonoPInvokeCallbackAttribute from Corelib (#47175)
Ryan Lucia [Wed, 20 Jan 2021 08:41:51 +0000 (03:41 -0500)]
[mono] Remove MonoPInvokeCallbackAttribute from Corelib (#47175)

Xamarin guidance was to define it in projects separately, so we can safely remove it from Corelib but not the runtime handling.

3 years agoEnable EventPipe C library build on IOS. (#47049)
Johan Lorensson [Wed, 20 Jan 2021 08:01:06 +0000 (09:01 +0100)]
Enable EventPipe C library build on IOS. (#47049)

3 years agoRemove extra UnmanagedCallersOnly overhead on x86 (#46238)
Jeremy Koritzinsky [Wed, 20 Jan 2021 07:58:03 +0000 (23:58 -0800)]
Remove extra UnmanagedCallersOnly overhead on x86 (#46238)

* Implement emitting an unmanaged calling convention entry point with the correct argument order and register usage on x86.

* Move Unix x86 to the UnmanagedCallersOnly plan now that we don't need to do argument shuffling.

* Add SEH hookup and profiler/debugger hooks to Reverse P/Invoke entry helper to match custom x86 thunk.

Fixes #46177

* Remove Windows x86 assembly stub for individual reverse p/invokes. Move Windows x86 unmanaged callers only to not have extra overhead and put reverse P/Invoke stubs for Windows x86 on the UnmanagedCallersOnly plan.

* Further cleanup

* Remove extraneous UnmanagedCallersOnly block now that x86 UnmanagedCallersOnly has been simplified.

* Undo ArgOrder size specifier since it isn't needed and it doesn't work.

* Fix copy constructor reverse marshalling. Now that we don't have the emitted unmanaged thunk stub, we need to handle the x86 differences for copy-constructed parameters in the IL stub.

* Fix version guid syntax.

* Remove FastNExportHandler.

* Revert "Remove FastNExportHandler."

This reverts commit 423f70ee4d564147dc0ce370d38b3a38404f8e22.

* Fix setting up entry frame for new thread.

* Allow the NExportSEH record to live below ESP so we don't need to create a new stack frame.

* Fix formatting.

* Assign an offset for the return buffer on x86 since it might come in on the stack.

* Make sure we use the TC block we just put in on x86 as well.

* Shrink the ReversePInvokeFrame on non-x86 back to master's size.

* Fix arch-specific R2R constant.

* Pass the return address of the ReversePInvokeEnter helper to TraceCall instead of the entry point and call TraceCall from all JIT_ReversePInvokeEnter* helpers.

* Fix ILVerification and ILVerify

* fix R2R constants for crossgen1

* Don't assert ReversePInvokeFrame size for cross-bitness scenarios.

3 years agoFix regex test OOM (#47209)
Dan Moseley [Wed, 20 Jan 2021 05:52:35 +0000 (21:52 -0800)]
Fix regex test OOM (#47209)

3 years agoPop LMF frames in exception handlers on wasm, since the normal pop LMF code might...
Zoltan Varga [Wed, 20 Jan 2021 04:16:22 +0000 (23:16 -0500)]
Pop LMF frames in exception handlers on wasm, since the normal pop LMF code might not get executed in case of an exception. (#47144)

* Pop LMF frames in exception handlers on wasm, since the normal pop LMF code might not get executed in case of an exception.

Fixes https://github.com/dotnet/runtime/issues/46613.

* Update src/mono/mono/mini/llvmonly-runtime.c

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
3 years agoFix HttpWebResponse.GetHeaderValueAsString to properly handle empty inputs (#47179)
Stephen Toub [Wed, 20 Jan 2021 03:54:39 +0000 (22:54 -0500)]
Fix HttpWebResponse.GetHeaderValueAsString to properly handle empty inputs (#47179)

3 years agoConsider nextIntervalRef of other half of double registers for ARM (#47032)
Kunal Pathak [Wed, 20 Jan 2021 03:10:37 +0000 (19:10 -0800)]
Consider nextIntervalRef of other half of double registers for ARM (#47032)

* use getNextIntervalRef for arm

* Remove dead code Registers and RegisterIterator

* For TYP_DOUBLE interval, check if other half can be candidate for PREV_REG_OPT heuristics

* jit format

* fixed the way foundPrevRegOpt is set

* nit

3 years agoFix missing mono jit nupkg runtime library (#47193)
Jo Shields [Wed, 20 Jan 2021 01:27:44 +0000 (20:27 -0500)]
Fix missing mono jit nupkg runtime library (#47193)

Resolve race condition w/ empty Microsoft.NETCore.App.Runtime.Mono.linux-x64

With the original Subsets.props, some packaging targets are called in an AOT-only environment, and are simply missing some files (because in AOT-only, the JIT was not built). These half-empty nupkgs are uploaded during AzDO builds, after the "correct" JIT builds, and overwriting them. Make changes here to avoid replacing good packages with bad - simply do not call those targets in this situation.

3 years agoFree the second half of double register (#46939)
Kunal Pathak [Wed, 20 Jan 2021 00:34:35 +0000 (16:34 -0800)]
Free the second half of double register (#46939)

* free the second half of double register

* Take appropriate regmask

* revert part of comment