Age | Commit message (Collapse) | Author |
|
getFieldAddress (#77737)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
|
|
|
|
|
|
Co-authored-by: Ankit Jain <radical@gmail.com>
|
|
* Fix Equals in hot reload scenario
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
|
|
* Stop calling fgMorphBlockOperand
* Fix missing NO_CSEs
* Simplify
* Delete fgMorphBlockOperand
|
|
* React to CheckForOverflowUnderflow in regex source generator
The regex source generator uses code patterns that might have arithmetic overflows, e.g. a bounds check with `(uint)index < span.Length`. These are intentional, and they're benign... unless the project/compilation has opted-in to overflow/underflow checking (CheckForOverflowUnderflow). In that case, the code for many patterns can start throwing false positive overflow exceptions, making the source generator unusable.
This commit causes the generator to look at the CheckOverflow setting in the compilation options, and if it's set, to emit `unchecked { ... }` around all the relevant code.
* Address PR feedback
|
|
The framework where we publish it is NETCore.App, not WindowsDesktop.
|
|
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
|
|
* Fix relative symlink support in TarFile
* Update src/libraries/System.Formats.Tar/tests/TarFile/TarFile.CreateFromDirectory.File.Roundtrip.cs
Co-authored-by: David Cantú <dacantu@microsoft.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
|
|
(#78182)
* [mono][aot] Prefer concrete instances instead of gshared ones for methods containing type equality checks.
For example, calls to Vector<T>.IsSupported cannot be optimized away in a method where T
is T_BYTE because its written as:
```
get => (typeof(T) == typeof(byte)) ||
(typeof(T) == typeof(double)) ||
```
and T_BYTE could be instantiated with an enum whose basetype is byte.
Fixes some of the issues in https://github.com/dotnet/runtime/issues/78163.
* Avoid an assert when compiling Vector<object> instances.
|
|
* Add thread local to skip textual PGO data if invoked recursively
* Change AssemblyNameParser.ParseVersion to pass
NumberFormatInfo.InvariantInfo in its ushort.TryParse invocation.
This avoids initializing globalization from within this parsing, which
was causing problems in the textual PGO scenario.
Fix #77971
|
|
* Defined API
* Tests
* Scalar implementation
* Use EqualityComparer<T>.Default instead
* Delegation to SpanHelpers.Replace
* ReplaceValueType implemented
* Use ushort instead of short, as it doesn't sign-extend for broadcast and in the scalar loop
* Forward string.Replace(char, char) to SpanHelpers.ReplaceValueType
* Process remainder vectorized only when not done already and with max width available
* Split into inlineable scalar path and non-inlineable vectorized path
* Replaced open coded loops with Replace
* Don't use EqualityComparer<T>.Default
Cf. https://github.com/dotnet/runtime/pull/76337#discussion_r982886319
* Remove guards for remainder
Cf. https://github.com/dotnet/runtime/pull/76337#discussion_r983448480
* Don't split method into scalar and vectorized and don't force inlining of scalar-part
* Fixed assert
ReplaceValueType is called from string.Replace(char, char) so the Debug.Assert was on wrong position, as at entry to method non accelerated platforms are allowed to call it.
* Better handling of remainder from the vectorized loop(s)
Intentionally leave one iteration off, as the remaining elements are done vectorized anyway. This eliminates the less probable case (cf. https://github.com/dotnet/runtime/pull/76337#discussion_r983448480) that the last vector is done twice.
* PR feedback
|
|
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
|
|
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
|
|
Port all of the vector tests to the new xunit style specification
- Test disables need to use the attribute based form
- All tests are run on all architectures (This wasn't happening in the old system, but hopefully with test striping the need for this has gone away.)
|
|
advanced. (#78221)
* Ensure the async reader state resets the BOM offset in every AdvanceBuffer() call.
* Add BOM insertion to async serialization stress testing
* Update src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/JsonSerializerWrapper.Reflection.cs
|
|
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
|
|
* xequal special instruction for floats
* reduce code
* Moving type pass to emit_xequal
* OP_EXTRACT_MASK
* remove space
* Update src/mono/mono/mini/mini-amd64.c
* Update src/mono/mono/mini/mini-amd64.c
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
|
|
|
|
Need to pass additional lib.
|
|
* exclude dynamic libraries when forceAOT=true
* use preferDylibs insted of foreceAOT
|
|
AutomaticDecompression in HttpClient. (#78198)
This allow for the Brotli compression code to be trimmed in a NativeAOT app that uses HttpClient, which is about 1 MB of size savings on Linux.
|
|
Co-authored-by: Stephen Toub <stoub@microsoft.com>
|
|
|
|
SetMessageSendCallback (#77956)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
* Make Type.GetTypeCode an intrinsic
Makes Type.GetTypeCode a JIT intrinsic for primitive types,
enums and strings.
Makes Type.IsEnum use intrinsics instead of IsSubclassOf
Makes Enum.GetUnderlyingType use Type.GetTypeCode
Moves the legacy FCall to InternalGetUnderlyingTypeImpl,
so that the non-intrinsic GetTypeCode can use it.
Introduces JIT tests checking the generated codegen.
* Change IsEnum to an intrinsic
* Fallback to the FCall for nint/nuint enums
* Fix compilation
* Add missing Intrinsic
* Add typeof support to IsKnownConstant
* Use gtIsTypeHandleToRuntimeTypeHelper
* Add __reftype tests
* Make more places use gtIsTypeof
* Update EnumTests.cs
* Add impTypeGetTypeCode to the header
* Update EnumGetUnderlyingTypeEnums.il
* Make the IsActualEnum helper an intrinsic
* Remove GetTypeCode intrinsics
* Create a new JIT-EE api, add GetEnumUnderlyingType back
* Optimize GetTypeCode with IsKnownConstant
* Change the code to make the inliner happy
* Handle all types in GetTypeCode
* Check for custom types
* Fix build, do suggested changes
Co-authored-by: Andy Ayers <andya@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
* Updating CreateScalar to be intrinsic for Vector64/128/256
* Applying formatting patch
* Fixing CreateScalar VecCon nodes created on import and find use before insert
* Applying formatting patch
* Ensure we zero extend TYP_BYTE and TYP_SHORT
* Ensure TYP_UBYTE and TYP_USHORT are also explicitly zero extended
* Fix the cast and add a comment explaining "why"
* Applying formatting patch
|
|
|
|
* Fix regex fixer to maintain string literal syntax
* Simplify
* Still transform interpolated strings
|
|
* Fix morph issue with fgOptimizeEqualityComparisonWithConst
- On arm32 a shift of a long requires a helper call, but the optimization in fgOptimizeEqualityComparisonWithConst for converting a right shift into a left shift was not keeping the GTF_CALL flag on the GenTree node.
* Update src/coreclr/jit/morph.cpp
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
|
|
(#77353)
* Introduce GT_FIELD_ADDR
* Add FIELD_ADDR to fgAddrCouldBeNull
* Add gtNewFieldAddrNode; move gtNewFieldRef
* Implement Windows x86 TLS via FIELD_ADDR
Tested manually to work as well as it did before.
* Silence the IR checker
* Minor code cleanup
* Prepare morph for instance FIELD_ADDRs
* Fix ObjectAllocator
* Use FIELD_ADDR in ld[s]flda import
* Work around morphing issues
With NativeAOT, we can have FIELD_ADDR nodes that are
effectively NOPs (those for the method table pointer field).
This means not all operators that the expansion produces
will be simple (in fact, they can be more or less arbitrary).
This means we cannot simply call "fgMorphSmpOp" as we used to.
Unfortunately, we cannot just call "fgMorphTree" either, because
it propagates assertions on newly created (or, I suppose, bashed)
IND nodes. This creates lots of new cases where GTF_ORDER_SIDEEFF
is applied to these nodes, affecting CQ.
Work around this by calling "fgMorphTree" for non-simple operators
only.
|
|
|
|
* [wasm] Add Vector128.AndNot intrinsics
C#
var v = Vector128.Create(System.Random.Shared.Next(), System.Random.Shared.Next(), System.Random.Shared.Next(), System.Random.Shared.Next());
var v2 = Vector128.Create(System.Random.Shared.Next(), System.Random.Shared.Next(), System.Random.Shared.Next(), System.Random.Shared.Next());
v = Vector128.AndNot(v, v2);
is emitted as
...
i32x4.splat [SIMD]
local.get $5
i32x4.replace.lane 1 [SIMD]
local.get $6
i32x4.replace.lane 2 [SIMD]
local.get $7
i32x4.replace.lane 3 [SIMD]
local.get $8
i32x4.splat [SIMD]
local.get $9
i32x4.replace.lane 1 [SIMD]
local.get $10
i32x4.replace.lane 2 [SIMD]
local.get $2
i32x4.replace.lane 3 [SIMD]
v128.andnot [SIMD]
v128.store offset:8 align:3 [SIMD]
...
* Review feedback
|
|
* amd64
* arm64
* fix ARM64 build
* import conditionally
|
|
deps (#78139)
The `LightupAppActivation` tests are testing handling of additional deps. The actual app and lib are not really interesting, so we can switch them to the dependency resolution tests that use a mock coreclr and don't actually run an app. On my Windows machine, this goes from ~20s to run the deleted tests to ~700ms to run the new tests.
|
|
* Add REAMDE.md for ServiceProcess.ServiceController
|
|
(#77987)
`hostpolicy` keeps a global `hostpolicy_init_t` around which has a list of `fx_definition_t` which each contain an associated `deps_json_t`. The deps are resolved/parsed on initialization of hostpolicy, updating the globally-stored information with all the resolved assets and computing properties that will be passed to the runtime.
The only part of the deps resolution results we currently use after initialization / computing the properties is the rid fallback graph of the root framework (for component dependency resolution). Everything else we are just holding on to for the lifetime of the application.
This separates `deps_json_t` from `fx_definition_t` such that we:
- don't keep all the resolved deps around for the lifetime of the application
- store only the one rid fallback graph we need for future resolutions
- stop including/building deps parsing functionality in `hostfxr` (via `hostcommon`)
For a blank console app (so no other dependencies, just NETCoreApp) running on Windows, this reduces the amount we keep on the native heap by ~200kB. The more dependencies, the more we were keeping around.
|
|
It was never wired up in the CMake based build system and we set visibility hidden by default now.
|
|
|
|
* Fix bug with BigInteger.TrailingZeroCount
* Update src/libraries/System.Runtime.Numerics/tests/BigIntegerTests.GenericMath.cs
Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
* Update negative code path
* Simplify logic for handling negative values
* Update src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs
Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
* Update comment
Co-authored-by: Tommi Kekäläinen <76913562+tkekalainen@users.noreply.github.com>
|
|
* Split TryFindNextStartingPosition into LeftToRight and RightToLeft versions
A previous change increased the size of the method. Splitting it to reduce the size (and how many locals needed to be zerod) as well as to reduce some branching.
* Avoid generating match-all code for starting "any" sets
* Avoid using IndexOfAnyExcept('\n') for TryFindNextPossibleStartingPosition
It's common at the beginning of a pattern and it's rare to have long sequences of newlines that benefit from IndexOf.
Also tweak how we prioritize sets; if two sets have ranges, prefer the one whose range is less inclusive / has a lower chance of matching (based purely on count).
* Address PR feedback
|
|
|
|
* Fix non-determinism in Regex source generator
The source generator enumerates a Hashtable to write out its contents. When the keys of the Hashtable are strings, string hash code randomization may result in the order of that enumeration being different in different processes, leading to non-deterministic ordering of values written out and thus non-deterministic source generator output.
* Address PR feedback
|
|
|
|
* Return NULL for mmap fail case on Unix
If mmap failed, "MAP_FAILED" is returned not "NULL".
The windows implememtation of GetRWMapping returns "NULL" for fail case,
and the caller function is also checking "NULL".
So, change Unix implementation to return "NULL" for fail case.
* call memset when mmap succeeds
* check MAP_FAILED instead of NULL
* return false for failing mmap
* Call g_fatalErrorHandler if releasing failed
* Update src/coreclr/utilcode/executableallocator.cpp
Co-authored-by: Jan Vorlicek <jan.vorlicek@volny.cz>
* Fix wrong condition check
Co-authored-by: Jan Vorlicek <jan.vorlicek@volny.cz>
|
|
|
|
mono (#76890)
|
|
It wasn't updated after the dnceng-public move.
|