Fan Yang [Tue, 25 Jul 2023 17:25:55 +0000 (13:25 -0400)]
[Mono] UnsafeAccessor: Support ambiguous method match (#89217)
* Support Ambiguous Match
* Stop unsafe accessor method lookup from walking the type hierarchy. And address the review feedback
* Handle the AmbiguousMatchException
* Fix test failure
* Adjust Mono function pointer comparison behavior to match with CoreCLR
* Fix ambiguous match
* Enable Verify_InheritanceMethodResolution
* Remove redundant curly braces
* Address review feedback
Eirik Tsarpalis [Tue, 25 Jul 2023 16:49:48 +0000 (17:49 +0100)]
Disable failing test. (#89442)
Steve Harter [Tue, 25 Jul 2023 15:46:11 +0000 (10:46 -0500)]
Enable Mono for using faster invoke stubs (#89108)
Ankit Jain [Tue, 25 Jul 2023 15:32:39 +0000 (11:32 -0400)]
[wasm] WBT fixes, and rationalization to allow improved testing (#89360)
* Move DotNetFileName.cs, and TestUtils.cs to Common
* Move some types from BuildTestBase.cs to separate files
- FileStat
- BuildPaths
- BlazorBuildOptions
- GlobalizationMode
* Move AssertTestMainJsAppBundleOptions.cs to Common
* Instead of globalizationMode=null use GlobalizationMode.Default
* Merge behaviors for the various project types
- Move parsing bootjson, checking icu assets, symbols to ProviderBase, so it can
be used by all the project types. These come from WasmAppBuilder which
is shared by all the projects.
- Instead of multiple separate ways to build the project, use one
`BuildTestBase.BuildWithoutAssert` method that uses `DotNetCommand` to
build. And all the project types can use this.
- This allows having any build customizations or fixes to be in once
place, and the outputs to be consistent.
- Instead of having `UseWebcil` in various option types, use it directly
as needed, because this setting is *not* changed per test, rather it
is fixed per run.
- Rationalize figuring out bin framework directories
Known limitations:
- Wasm template tests use a TestMainJs provider to assert the bundle
because the templates are not yet based on wasm sdk.
- Blazor has a bug due to which all the icu assets get deployed
irrespective of settings, so asserting that is disabled.
- Also, blazor does not yet support symbols file.
* Update tests to track api changes
* CI: don't trigger jobs when WasmBuild.sln changes
* Address feedback from @ilonatommy
* Address feedback from @ilonatommy - simplify icu assert code
Thays Grazia [Tue, 25 Jul 2023 15:21:58 +0000 (12:21 -0300)]
Adding test for #80049 (#89399)
Jakob Botsch Nielsen [Tue, 25 Jul 2023 14:57:51 +0000 (16:57 +0200)]
Run Antigen/Fuzzlyn on Saturdays too (#89426)
Up the frequency of the Antigen and Fuzzlyn runs to also run on
Saturdays during these last weeks of .NET 8 development.
Eirik Tsarpalis [Tue, 25 Jul 2023 11:29:56 +0000 (12:29 +0100)]
Fix System.BinaryData tests failing in AOT. (#89381)
Ivan Povazan [Tue, 25 Jul 2023 11:27:31 +0000 (13:27 +0200)]
[NativeAOT] Refactor Linq feature switches (#89308)
Pavel Savara [Tue, 25 Jul 2023 10:52:49 +0000 (12:52 +0200)]
fix NodeJS fetch detection (#89393)
Radek Doulik [Tue, 25 Jul 2023 10:39:31 +0000 (12:39 +0200)]
[wasm] Make PackedSimd.Shuffle internal (#89401)
We don't want it public until we fix the llvm/aot compiler crash
Alexander Köplinger [Tue, 25 Jul 2023 09:16:47 +0000 (11:16 +0200)]
Bump timeout in runtime-extra-platforms-ioslike.yml (#89400)
Egor Bogatov [Tue, 25 Jul 2023 08:20:10 +0000 (10:20 +0200)]
Remove InstructionSet_VectorT256 if AVX2 is disabled via env var
Nickolas McDonald [Tue, 25 Jul 2023 08:06:07 +0000 (04:06 -0400)]
Enable events for LogAlways (#89326)
Michal Strehovský [Tue, 25 Jul 2023 04:49:44 +0000 (13:49 +0900)]
Make textual stack trace metadata smaller (#89377)
When we need to generate a textual stack trace in NativeAOT, we rely on two things - reflection metadata for methods, or a supplementary stack trace metadata format.
The reflection metadata case is simple - reflection keeps track of method addresses and the associated metadata like names and signatures. We ask for metadata handles (tokens, basically) and we get the handles back. We then walk the metadata and format textual strings.
When reflection metadata is not available, we have to emit some other metadata in the compiler. We use the same metadata format and conceptually the closest thing were unresolvable `MemberReference`s, so we basically generated a pair of method pointer + MemberReference handle for each method body that doesn't have reflection metadata. It's a lot less metadata than for a resolvable definition, but is still quite a bit wasteful.
This change avoids generating full `MemberReference` and instead inlines owning type/name/signature handle/token into the mapping table. We also do it in a way that avoids emitting owning type/name/signature if it's the same as the record before that.
Michal Strehovský [Tue, 25 Jul 2023 00:56:24 +0000 (09:56 +0900)]
Delete NativeAOT_StaticInitialization (#89291)
Undoes workaround from dotnet/runtimelab#270. Since bootstrapper no longer ships as a static library (it's an object file instead), we should no longer need this hack to force linker into looking at the archive.
Will Smith [Tue, 25 Jul 2023 00:17:50 +0000 (17:17 -0700)]
Fixed python warning: DeprecationWarning: There is no current event loop (#89404)
* Fixed python warning: DeprecationWarning: There is no current event loop
* Update superpmi.py
Will Smith [Mon, 24 Jul 2023 23:41:40 +0000 (16:41 -0700)]
Do not show a pop-up dialog when an assertion occurs in SuperPMI collection (#89336)
Layomi Akinrinade [Mon, 24 Jul 2023 23:18:26 +0000 (16:18 -0700)]
Fix config src-gen issues with binding nullable values (#89397)
Pavel Savara [Mon, 24 Jul 2023 20:03:13 +0000 (22:03 +0200)]
[browser][mt] Release all proxies of C# and JS objects (#88052)
Jakob Botsch Nielsen [Mon, 24 Jul 2023 18:32:52 +0000 (20:32 +0200)]
Tweak and fix physical promotion test environments (#89380)
- Physical promotion is enabled by default now, so switch the scenario to one
that tests physical promotion without old promotion
- JitStressModeNames was missing from DOTNETVariables, which meant that after
the switch from JitEnablePhysicalPromotion to JitStressModeNames we stopped
testing the right thing
Natalia Kondratyeva [Mon, 24 Jul 2023 18:20:27 +0000 (19:20 +0100)]
Disable mock test on aot (#89390)
Mitch Capper (they, them) [Mon, 24 Jul 2023 18:18:35 +0000 (11:18 -0700)]
DependencyGraphViewer: Feature add same window navigation for NodeForm (#84542)
* DependencyGraphViewer: Feature add same window navigation for NodeForm
Add ability to reuse current window rather than open new, added history
(forward/back) and arrow key accelerators as well.
* Fix code formatting
---------
Co-authored-by: David Wrighton <davidwr@microsoft.com>
Will Smith [Mon, 24 Jul 2023 17:07:29 +0000 (10:07 -0700)]
Added 'DOTNET_JitDisasmTesting' knob. (#89373)
* Added 'DOTNET_JitDisasmTesting' knob.
* Formatting
David Pine [Mon, 24 Jul 2023 16:51:40 +0000 (11:51 -0500)]
Implement new streaming APIs for the `System.Net.Http.Json` extensions (#89258)
* Contributes to #87577
* More updates
* Added unit tests, generated ref, and minor clean up
* Added missing triple slash comments
* Update src/libraries/System.Net.Http.Json/tests/FunctionalTests/HttpClientJsonExtensionsTests.cs
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Correct the preprocessor directives, and delegate to JsonTypeInfo overload - per peer feedback.
* Refactor for deferred execution, remove helper methods since they're no longer needed
* Add test to ensure deferred execution semantics, updates from Miha.
* Apply suggestions from code review
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Update src/libraries/System.Net.Http.Json/src/System/Net/Http/Json/HttpClientJsonExtensions.Get.AsyncEnumerable.cs
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Update test per Miha's feedback
* A few more updates from peer review, Eirik's nits.
* No need for the length limit read stream.
* Add limit per invocation, not element. Share length limit read stream logic.
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Sven Boemer [Mon, 24 Jul 2023 16:29:43 +0000 (09:29 -0700)]
Make checks for compiler-generated types more specific (#89327)
The only types we want to consider for the compiler-generated
state handling are lambda display classes, and state machine
types. We used to treat all types with compiler-generated names
this way, but this was too broad of a filter because it would
include file-scoped classes (which get names like
`<GeneratedConfigurationBinder_g>F86B5F805A26B32373DA5BA80136649730AD5F76CC2979BFEE086BEB55048B927__CoreBindingHelper`,
for the configuration binder source generator).
Stephen Toub [Mon, 24 Jul 2023 16:23:56 +0000 (12:23 -0400)]
Use JIT intrinsic for UTF8 encoding in Utf8.TryWrite's AppendLiteral (#89376)
* Use JIT intrinsic for UTF8 encoding in Utf8.TryWrite's AppendLiteral
* Remove IsKnownConstant
Jan Dupej [Mon, 24 Jul 2023 15:48:12 +0000 (17:48 +0200)]
[mono][ios] Drop marshal-ilgen from iOS builds if it is not needed (#88903)
* MarshallingPInvokeScanner is applied to Apple toolchains.
* HelloiOS example uses simpler string marshaling.
* Removing marshal-ilgen from HelloWorld.
* Runtime components and runtime library paths are now decided in the correct order relative to building the native runtime.
* RuntimeComponents is manipulated through an ItemGroup.
* Cleaned up commented old code.
* Reordered runtime components section.
* Addressed more feedback.
dotnet bot [Mon, 24 Jul 2023 15:14:50 +0000 (17:14 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2227046 (#89321)
Vladimir Sadov [Mon, 24 Jul 2023 13:14:23 +0000 (06:14 -0700)]
[NativeAOT] Replace GVMLookupForSlot internal cache with generic cache similar to CastCache (#89331)
* factored out CastCache to be able create several.
* Cache impl
* generic cache
* some refactoring
* separated GenericCache
* comments
* less refs
* do not store hash
* fix CoreCLR and some more refactoring
* PR feedback
* remove no longer needed CastCache wrapping constructor
* remove auto-inserted unused usings.
* remove unused ActivatorCreateInstanceAny
dependabot[bot] [Mon, 24 Jul 2023 10:19:13 +0000 (12:19 +0200)]
Bump word-wrap from 1.2.3 to 1.2.4 in /src/mono/sample/wasm/node-webpack (#89198)
Michał Petryka [Mon, 24 Jul 2023 08:50:31 +0000 (10:50 +0200)]
Avoid BYREF trees in ByteOffset (#89324)
Solves the particular problematic case from #84291.
Vlad-Alexandru Ionescu [Mon, 24 Jul 2023 08:46:36 +0000 (10:46 +0200)]
[mono][jit] Enabled more intrinsics for V4 on arm64 (#88912)
* Enabled more intrinsics for V4
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
---------
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Co-authored-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Michal Strehovský [Mon, 24 Jul 2023 01:54:30 +0000 (10:54 +0900)]
Don't always do optimistic HW intrinsic expansion (#89282)
"Optimistic" expansion means we generate a method body for `IsSupported` that returns true/false depending on the currently running CPU. Don't do this when `--instruction-set:native` was specified because native should mean "exactly this". Also don't do this when optimizing for size (saves 0.6% on hello world). I was going back and forth whether to do this when user specifies instruction sets manually, but decided it would be a "breaking" change.
VincentWu [Mon, 24 Jul 2023 01:17:07 +0000 (11:17 +1000)]
[Mono] [RISCV] Fix abi issues (Monthly pr) (#88649)
* update makefile
* add format file
* use mul inst instead of emulate mul
process stack size larger than imm32
* emit get_throw_trampoline
* mono_riscv_throw_exception
* fix error of stack trace
* test case
* output inst idiv
fix mono_riscv_emit_branch_exc
* implement mono_arch_get_throw_corlib_exception
* fix rdiv
* move ArgOnStack arg at prologue
lowering OP_XOR_IMM&OP_IXOR_IMM
* fix emit_imm
* test imm
* update test case
* use swich to process return value
* fix unwind inst def_cfa
* fmt
* lowering OP_LMUL_IMM
* make file for webapiclient
* lowerng&output
- OP_FCONV_TO_I8
- OP_LXOR_IMM
- OP_ISHR
* lowerng&output
- relaxed_nop
- float_cle
- long_shl
- OP_ICONV_TO_R_UN
- OP_LCONV_TO_I2
- OP_FBGE
- OP_IDIV_IMM
* fix this_pointer in vcall with valuetype returned
- The ABI specify that If the reture value would have been passed by reference, the caller will allocates memory for the return value, and passes the address as an implicit first parameter.
- The Mono will treat first parameter as this_pointer reference to `mono_vcall_trampoline()`. They are conflict a bit.
* process param type: ArgVtypeOnStack & ArgVtypeByRef
* lowering OP_LCONV_TO_I2
* OP_IREM_UN_IMM
OP_ATOMIC_LOAD_U1
OP_IREM_UN_IMM
* fix output of OP_IREM & OP_IREM_UN
OP_IREM -> riscv_remw
OP_IREM_UN -> riscv_remuw
* use `lw` to load u4 value on the stack
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#integer-calling-convention
* optmise lw+zext -> lwu
* fix patch_full
use mono_riscv_emit_loadu to emit lwu
fix rem
* fix `mono_arch_build_imt_trampoline` when `item->is_equals==false`
* FIXME: reg got crashed wetween `this` and return ref
* fix `mono_arch_build_imt_trampoline`
* float_sub & float_div
* OP_FNEG,OP_LADD_OVF,OP_FBEQ, OP_COND_EXC_OV
* fix mono_arch_emit_outarg_vt
* process ArgVtypeOnStack in emit_move_args
* add sample status
* fix valid imm check of OP_L.*_IMM
* OP_LCONV_TO_R_UN
* update
* fix the param order stored o stack
* fix the param size of MONO_TYPE_I & MONO_TYPE_U when RV64
* add test task for makefile
* update .clang-format
* fmt
* fix merge
* TMP
* clean pr
* keep this_pointer always be RISCV_A0
Egor Bogatov [Sun, 23 Jul 2023 21:45:14 +0000 (23:45 +0200)]
JIT: Intrinsify UTF16->UTF8 conversion for string literals (Encoding.UTF8.TryGetBytes) (#85328)
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Michał Petryka [Sun, 23 Jul 2023 18:20:38 +0000 (20:20 +0200)]
Fix potential BitCast bug for platforms without unaligned reads (#89364)
BitCast could potentially make an invalid read when reinterpreting a type to another that requires higher alignment, which could possibly cause a fault on Mono ARMv6.
Jan Kotas [Sun, 23 Jul 2023 16:27:36 +0000 (09:27 -0700)]
Fix EventPipe utf8 conversion methods to match between JIT and AOT (#89353)
Michał Petryka [Sun, 23 Jul 2023 14:51:47 +0000 (16:51 +0200)]
Intrinsify Unsafe.Read/Write/Copy, handle struct BitCast (#85562)
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
Jan Kotas [Sun, 23 Jul 2023 04:13:29 +0000 (21:13 -0700)]
Unify hardware feature detection between CoreCLR JIT and AOT (#89342)
Follow up on #87865
Kevin Jones [Sun, 23 Jul 2023 03:42:40 +0000 (23:42 -0400)]
Properly close PKCS12 files when enumerating stores
Andy Ayers [Sat, 22 Jul 2023 22:20:55 +0000 (15:20 -0700)]
Update PAL and GC `BitScanForward` to use `__builtin_clz` (#89350)
The existing PAL code was using `__builtin_clzl` which is intended for platforms
where `long` is 64 bits. Instead use `__builtin_clz`.
The GC version had a similar issue so I've changed that too. The JIT version
was already using `__builtin_clz`.
Fixes #89340.
Michal Strehovský [Sat, 22 Jul 2023 12:54:19 +0000 (21:54 +0900)]
Set BaseSize of interfaces to 0 (#89343)
We were computing these as the minimum object size. This number is meaningless because they don't get allocated on the GC heap. A zero compresses better. Surprisingly saves like 0.1% on Hello World despite being such an insignificant thing.
Andy Gocke [Sat, 22 Jul 2023 06:44:11 +0000 (23:44 -0700)]
Fix exe size for Mach-O files (#89325)
The extra size appears to be the export list, which is zeroed
but not removed when the file is stripped. Exes shouldn't have
any exported symbols by default, but ld will include everything
by default. We'll fix it up using an ld flag.
Fixes #86707
Michal Strehovský [Sat, 22 Jul 2023 06:19:11 +0000 (15:19 +0900)]
Remove incorrect flag setting (#88878)
This was added in https://github.com/dotnet/runtime/pull/85743#discussion_r1215117945. Setting this flag is not the right thing to do. It sweeps issues under the carpet. Also, we're only doing it for signature type variables, not method variable. And since no tests seem to be failing, it might not even be necessary.
mikelle-rogers [Fri, 21 Jul 2023 21:39:12 +0000 (14:39 -0700)]
Fix TestGenericAddStaticField (#89145)
* Fix TestGenericAddStaticField
* use the correct Method Table to gather fields
SingleAccretion [Fri, 21 Jul 2023 20:53:06 +0000 (23:53 +0300)]
Upstream some changes to portable allocation helpers (#89269)
Dong-Heon Jung [Fri, 21 Jul 2023 20:31:35 +0000 (05:31 +0900)]
[RISC-V][JIT] Fix NaN canonicalization issue (#88510)
* [RISC-V][JIT] Fix canonical NaN issue
* [RISC-V][JIT] Update to use helpers
* [RISC-V][JIT] Update conversion functions
* [RISC-V][JIT] Update
Andy Ayers [Fri, 21 Jul 2023 20:06:10 +0000 (13:06 -0700)]
Block inlining of IntroSort (#89310)
With PGO and (via #88749) one level of recursive inlining enabled, the jit sees
the recursive call made by `IntroSort` as an attractive inline candidate,
but it isn't.
Fixes #89106.
Jakob Botsch Nielsen [Fri, 21 Jul 2023 20:04:58 +0000 (22:04 +0200)]
JIT: Fix handling of filter successors (#89275)
Filters are run during the first pass of EH which makes determining
their successors complicated, and the JIT did not get this right. In
particular, after running filters as part of first-pass EH, control may
flow to any enclosed finally or fault handler as part of second-pass EH.
Thus, these should be considered as EH successors. This adds a
BasicBlock::VisitEHSecondPassSuccs to visit these successors.
The logic was mostly extracted from liveness that (almost) got it right:
there was a condition that meant the logic did not run for top-level
try-filter clauses. This change folds in Bruce's change to fix this
scenario as well.
There was one more bug in the logic in liveness: to determine the
enclosed fault/finally blocks, the logic iterates backwards in the EH
table while looking for enclosed clauses. However, this was only
checking for clauses enclosed in the try region when it should also
check for clauses enclosed in the handler region.
Fix #86538
Fix #88168
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Parker Bibus [Fri, 21 Jul 2023 19:46:37 +0000 (12:46 -0700)]
Copy tool build fix from performance repo to runtime repo. (#89323)
This doesn't include any changes to non-runtime-perf infra and changes have been tested in the performance pipeline, merging.
Mike Voorhees [Fri, 21 Jul 2023 19:04:23 +0000 (15:04 -0400)]
Remove etw --exclude-feature tests. (#89107)
`--exclude-feature` logic was removed. If there is no intent to support this with coreclr bcl then we won't worry about it either.
While we do need UnityLinker to continue to handle mono class libraries for awhile longer, the `--exclude-feature` functionality is a niche thing we can drop now.
Lakshan Fernando [Fri, 21 Jul 2023 18:46:14 +0000 (11:46 -0700)]
Use utf conversions from minipal (#89036)
* Support for utf conversion
* cast fix
* FB
* FB
* Update src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* FB
* FB
* FB
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Eirik Tsarpalis [Fri, 21 Jul 2023 16:23:44 +0000 (17:23 +0100)]
Emit a diagnostic when attributes deriving from JsonConverterAttribute are being used. (#89199)
* Emit a diagnostic when attributes deriving from JsonConverterAttribute are being used.
* Address feedback.
Eirik Tsarpalis [Fri, 21 Jul 2023 16:21:47 +0000 (17:21 +0100)]
Fix System.Net.Http.Json tests in AOT (#89307)
Viktor Hofer [Fri, 21 Jul 2023 15:58:42 +0000 (17:58 +0200)]
Move full facade assemblies into src/libraries/shims (#89184)
* Move full facade assemblies into src/libraries/shims
Fixes https://github.com/dotnet/runtime/issues/78978
1. Move all full facade assemblies (which only contain type forwards)
into src/libraries/shims.
2. Merge assemblies (ref+src) which typeforward to the same
destination.
3. They inherently now don't produce a documentation file anymore (as
shims only contain type forwards).
This minimizes the build graph (makes the libs build faster) and moves
the focus away from full facade assemblies that need to be kept for
compat reasons.
* Trigger CI for all legs
* Remove obsolete slns and undo CI change
* PR feedback from Eric
* Change System.ValueTuple type fowrard dest
* Collapse ref and src shims further
As discussed with Eric offline, typeforwarding to System.Runtime and
System.Xml.ReaderWriter makes it possible to collapse the following
ref and src projects into just src:
System.AppContext
System.Buffers
System.Diagnostics.Debug
System.Diagnostics.Tools
System.Globalization
System.Globalization.Calendars
System.IO.UnmanagedMemoryStream
System.Reflection
System.Resources.ResourceManager
System.Runtime.CompilerServices.Unsafe
System.Runtime.Extensions
System.Security.Principal
System.Text.Encoding
System.Threading.Timer
System.Xml.XmlDocument
The destination then handles the type fowarding to the private assembly
implementation.
Milos Kotlar [Fri, 21 Jul 2023 15:56:47 +0000 (17:56 +0200)]
[mono][tests] Parallel AOT compilation of runtime tests on iOS platforms (#86089)
The Helix payload is generated using the runtime pipeline. Then, the libraries pipeline is utilized to AOT compile and execute the tests on Helix. The build-runtime-tests-and-send-to-helix.yml is updated with the compileOnHelix parameter, which if set, uses the libraries/helix.yml template instead of the runtime send-to-helix-step.yml template. The runtime and libraries pipelines are updated to support AOT compilation of runtime tests on Helix.
neon-sunset [Fri, 21 Jul 2023 15:10:47 +0000 (18:10 +0300)]
Vectorize Enumerable.Range initialization, take 2 (#87992)
* Vectorize Enumerable.Range initialization
* Address PR feedback
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Stephen Toub [Fri, 21 Jul 2023 13:32:48 +0000 (09:32 -0400)]
Optimize MemoryMarshal.ToEnumerable for arrays and strings (#89274)
Radek Doulik [Fri, 21 Jul 2023 13:26:09 +0000 (15:26 +0200)]
[wasm] Add index of string span measurement (#89294)
Mike Voorhees [Fri, 21 Jul 2023 12:22:03 +0000 (08:22 -0400)]
Remove feature exclude xml tests (#89111)
illink dropped the exclude feature functionality, so will we.
I believe Unity was the last user of these tests so it's safe to delete them now.
t-mustafin [Fri, 21 Jul 2023 11:04:50 +0000 (14:04 +0300)]
[RISC-V] Fix GetArgLoc (#88657)
Huo Yaoyuan [Fri, 21 Jul 2023 09:12:59 +0000 (17:12 +0800)]
Use RegDeleteTree in RegistryKey.DeleteSubKeyTree (#82598)
* Use RegDeleteTree in RegistryKey.DeleteSubKeyTree
* Restore self delete behavior
* Call RegDeleteTree on subkey to simulate permission behavior.
* Adjust comment and add tests.
Aaron Robinson [Fri, 21 Jul 2023 02:13:24 +0000 (19:13 -0700)]
Virt call unsafe accessor tests (#89220)
* UnsafeAccessors are limited to lookup on
the defined typed.
* Update documentation for attribute.
---------
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Stephen Toub [Thu, 20 Jul 2023 21:47:50 +0000 (17:47 -0400)]
Add HttpMethod.Parse (#89270)
Jakob Botsch Nielsen [Thu, 20 Jul 2023 21:04:37 +0000 (23:04 +0200)]
JIT: Cache memory dependencies for VN map selects (#89241)
Hoisting relies on being able to look at which memory dependencies a
candidate is dependent upon. VN tracks these during the map select
logic; however, it fails to do so when the map selection hits the cache.
This changes the logic to make sure the memory dependencies are cached.
Fix #75442
Jakob Botsch Nielsen [Thu, 20 Jul 2023 20:29:46 +0000 (22:29 +0200)]
JIT: Expand inlined delegate calls in correct order (#89175)
The access of the target instance was incorrectly inserted right after
the location of the delegate instance. Since this indirection can throw
a NRE this is incorrect; to get the proper inlined behavior, the
indirection must happen only after all arguments have been evaluated.
Fix #75832
Eduardo Velarde [Thu, 20 Jul 2023 20:08:02 +0000 (13:08 -0700)]
Fire AssemblyUnloadStarted event (#87890)
Fixes https://github.com/dotnet/runtime/issues/86178
AssemblyUnloadStarted event is now being fired
dotnet-maestro[bot] [Thu, 20 Jul 2023 20:00:12 +0000 (15:00 -0500)]
[main] Update dependencies from dotnet/arcade dotnet/xharness (#89235)
* Update dependencies from https://github.com/dotnet/arcade build
20230719.2
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
From Version 8.0.0-beta.23364.2 -> To Version 8.0.0-beta.23369.2
Dependency coherency updates
Microsoft.DotNet.XliffTasks
From Version 1.0.0-beta.23360.1 -> To Version 1.0.0-beta.23368.1 (parent: Microsoft.DotNet.Arcade.Sdk
* Update dependencies from https://github.com/dotnet/xharness build
20230720.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 8.0.0-prerelease.23363.3 -> To Version 8.0.0-prerelease.23370.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Vlad Brezae [Thu, 20 Jul 2023 18:02:40 +0000 (21:02 +0300)]
[mono][interp] Add lock when allocating from method mempool (#89231)
MonoMemPool does not support multithreaded allocation. We lock on default jit_mm lock for convenience, since it is widely used in interpreter. We might want to consider using a separate lock.
Tanner Gooding [Thu, 20 Jul 2023 17:24:11 +0000 (10:24 -0700)]
Workaround a C++/CLI bug involving DIMs (#89253)
Layomi Akinrinade [Thu, 20 Jul 2023 17:13:51 +0000 (10:13 -0700)]
Filter list of candidate invocations for parsing in binding generator (#89226)
Will Smith [Thu, 20 Jul 2023 16:22:37 +0000 (09:22 -0700)]
[JIT] Fix - Do not remove `CAST` nodes on store if the `LCL_VAR` is a parameter or struct field (#85734)
* Do not remove CAST nodes on assignment if the LCL_VAR is a parameter.
* Added NormalizeOnLoad rules from SingleAccretion. Added description of why we cannot remove CAST nodes from parameters.
* Remove morph optimization for NormalizeOnLoad in fgMorphLocalVar. Update test.
* Do not OptimizeCastOnStore for params and struct fields
* Update src/coreclr/jit/morph.cpp
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
* Formatting
---------
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Parker Bibus [Thu, 20 Jul 2023 16:12:05 +0000 (09:12 -0700)]
[PERF] Finish fixing PerfBDNApp, continuation of #89057 (#89135)
Move performance repo clone to before the csproj update and pull out the BDNVersion value from the performance Versions.props.
Tarek Mahmoud Sayed [Thu, 20 Jul 2023 15:53:48 +0000 (08:53 -0700)]
Enable CLS Compliance on Diagnostics Libraries (#89214)
Carlos Sánchez López [Thu, 20 Jul 2023 15:12:37 +0000 (08:12 -0700)]
Bump main version to RC1 (#89151)
Alexander Köplinger [Thu, 20 Jul 2023 15:08:12 +0000 (17:08 +0200)]
Remove more duplicate assets from NativeAOT runtime pack build (#89239)
Pavel Ivanov [Thu, 20 Jul 2023 13:57:55 +0000 (18:57 +0500)]
Fix service accessor scope validation for the emit-based version
Elinor Fung [Thu, 20 Jul 2023 13:44:01 +0000 (06:44 -0700)]
Fix incorrect nativeaot event thread / sequence number on shutdown (#88941)
DIcKeNs [Thu, 20 Jul 2023 13:31:12 +0000 (21:31 +0800)]
SBLK_MASK_LOCK_THREADID allow tid up to 65535 (#88772)
* SBLK_MASK_LOCK_THREADID allow tid up to 65535
* copy comment from NativeAOT ObjectHeader.cs
---------
Co-authored-by: dickens <dickens.tam@pulsartradingcap.com>
Stephen Toub [Thu, 20 Jul 2023 13:23:23 +0000 (09:23 -0400)]
Broaden use of SearchValues in TryFindNextPossibleStartingPosition in Regex (#89205)
SearchValues has been updated to have an ASCII fast-path for inputs that are not only ASCII. This means we can simplify TryFindNextPossibleStartingPosition in Regex to not track AsciiSet specially and instead just increase the number of characters we query the set for (from 5 to 128). That way, we'll use SearchValues rather than emitting our own helper up until a (semi-arbitrary) point where we deem it impossible or infeasible to enumerate all the chars that make up the set.
Aleksey Kliger (λgeek) [Thu, 20 Jul 2023 13:03:51 +0000 (09:03 -0400)]
[AndroidAppBuilder] add missing includes to template (#89197)
* [AndroidAppBuilder] add missing includes to template
Treat missing protoype warnings as errors so this doesn't happen again.
Fixes https://github.com/dotnet/runtime/issues/69601
* also fixup library mode template
Marek Fišera [Thu, 20 Jul 2023 12:51:07 +0000 (14:51 +0200)]
[browser] Allow download retry+throttling in unified code with Blazor (#88910)
Michal Strehovský [Thu, 20 Jul 2023 08:15:02 +0000 (17:15 +0900)]
Add support for `--instruction-set:native` (#87865)
This allows compiling for the ISA extensions that the currently running CPU supports.
Miha Zupan [Thu, 20 Jul 2023 03:01:07 +0000 (05:01 +0200)]
Reduce ProbabilisticWithAsciiCharSearchValues overhead on non-ASCII texts (#89224)
Michal Strehovský [Thu, 20 Jul 2023 00:49:49 +0000 (09:49 +0900)]
Point ActiveIssues to moved issues (#89158)
We moved some issues from runtimelab to runtime. Re-point the tests to those.
Layomi Akinrinade [Thu, 20 Jul 2023 00:26:18 +0000 (17:26 -0700)]
Add more tests for complex dict element binding by generator (#89210)
Jeremy Koritzinsky [Wed, 19 Jul 2023 23:49:40 +0000 (16:49 -0700)]
Update UserTypeMarshallingV2.md (#89222)
Jeremy Koritzinsky [Wed, 19 Jul 2023 22:59:34 +0000 (15:59 -0700)]
Fix the default behavior to trim the RCW interop by default (#89128)
Miha Zupan [Wed, 19 Jul 2023 22:08:01 +0000 (00:08 +0200)]
Add a SearchValues ProbabilisticMap implementation that uses an ASCII fast path (#89155)
* Add a SearchValues ProbabilisticMap implementation that uses an ASCII fast path
* Add comments and asserts around IOptimizations selection
* Unused using
David Wrighton [Wed, 19 Jul 2023 21:53:48 +0000 (14:53 -0700)]
Add support for default implementation of static virtuals with method constraints (#89061)
- The major problem was the logic which incorrectly would instantiate the methods when it wasn't necessary
- As the number of flags to the implementation functions has grown very large, this change also includes logic converting them all to a single flags variable when passing them around
Fixes #73658
Fixes #78865
Michal Strehovský [Wed, 19 Jul 2023 21:38:47 +0000 (06:38 +0900)]
Build less of libs for CoreCLR tools tests (#89154)
Similar to #89153. I don't think we need System.Speech & co for tools tests.
Alexander Köplinger [Wed, 19 Jul 2023 20:52:53 +0000 (22:52 +0200)]
Fix duplicated assets in official build (#89188)
The additional osx-x64 and osx-arm64 legs added for NativeAOT in https://github.com/dotnet/runtime/pull/89018 caused the `runtime.osx-*.Microsoft.DotNet.ILCompiler` and runtime.osx-*.runtime.native.System.IO.Ports` packages to be duplicated.
This change makes sure we only publish them from one leg (the CoreCLR one).
Layomi Akinrinade [Wed, 19 Jul 2023 19:56:50 +0000 (12:56 -0700)]
Share SourceWriter between JSON & config binding generators (#89150)
* Share SourceWriter between JSON & config binding generators
* Fix failing test, clean up impl, and address feedback
Mike Voorhees [Wed, 19 Jul 2023 19:41:57 +0000 (15:41 -0400)]
Add Driver.Context setter (#89081)
We implement our own `Driver.SetupContext`. Our command line parsing logic is different and we have additional command line options.
In our very old revision of the upstream linker there was
```
protected LinkContext context;
```
Which we would set. This would ensure that if one of the helper methods that uses the context were called that things would all work.
The most common scenario seems to be for error logging. There are many helper methods that will call `Context.LogError` and if we haven't set the `context` field by then we have a problem.
We are syncing up and now the `context` field is private and there is a protected property getter, but no setter.
Adding a setter was the easiest way to get our context stored in the `context` field.
Mike Voorhees [Wed, 19 Jul 2023 19:40:46 +0000 (15:40 -0400)]
Clean up debugger attributes tests. (#89011)
* Remove `SetupLinkerKeepDebugMembersAttribute`. This isn't supported anymore by the linker.
* Remove NETCOREAPP behavior difference in debugger attribute removal tests
* Move `DebuggerDisplayAttributeOnTypeWithNonExistentMethod` to the `KeepDebugMembers` folder since that is the scenario this test is testing
Jakob Botsch Nielsen [Wed, 19 Jul 2023 19:20:20 +0000 (21:20 +0200)]
JIT: Clamp basic block IL ranges when splitting blocks (#89179)
In release, code motion/compaction may lead to statements ending up in
blocks that don't contain their IL offset. This can cause splitting of
blocks to create meaningless IL ranges such as [057..020). Since we
maintain these IL ranges on a best-effort basis, just clamp them when we
do the splitting.
Fix #88348
dotnet-maestro[bot] [Wed, 19 Jul 2023 19:05:11 +0000 (14:05 -0500)]
[main] Update dependencies from dotnet/icu dotnet/emsdk (#89147)
* Update dependencies from https://github.com/dotnet/emsdk build
20230718.3
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.7.23367.1 -> To Version 8.0.0-rc.1.23368.3
* Compute the package name from the version
* Use a generated regex
* Use VersionBandForManifestPackages for CI/dev versions
* Update dependencies from https://github.com/dotnet/icu build
20230718.2
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.7.23367.1 -> To Version 8.0.0-rc.1.23368.2
* Fix band calculation
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Ahmet Ibrahim Aksoy [Wed, 19 Jul 2023 18:59:29 +0000 (21:59 +0300)]
Fix OSX like cases (#89187)
Parker Bibus [Wed, 19 Jul 2023 17:02:22 +0000 (10:02 -0700)]
[PERF] Use script instead of powershell to set DOTNET_ROOT (#89123)
Use script for non-windows and powershell for windows.
Use the proper path separators for non-windows and windows.
Jeremy Koritzinsky [Wed, 19 Jul 2023 16:49:18 +0000 (09:49 -0700)]
Fix failures around blittable collections with [Out] and chars (#89149)