- 02 3月, 2022 20 次提交
-
-
由 Jan Kotas 提交于
The special casing of co-variant arrays was added in the original safe implementation to avoid exceptions from AsSpan (https://github.com/dotnet/coreclr/pull/22331#discussion_r252904254). ArrayTypeMismatchException is no longer a concern with the new unsafe implementation. There is a subtle behavior change in the actual type for co-variant arrays of reference types. However, the new behavior matches Array.Resize and it is very unlikely for any code out there to depend on this co-variant arrays corner case.
-
由 Ilona Tomkowicz 提交于
* Optional parameter fix. * Working version of optional parameter support, requires refactoring. * Refactored. * Fixed failing tests. * Add support to functions returning char, add test to an existing case. * Simplified tests. * Merged with optional params, uncommented char test * Remove spaces. * Applied @radical's suggestions. * Removed indentation. * Another indentation. * Removed comment. * Reverted type=char, as @radical suggested. * Applied @radical's suggestions. No need for escaping + reverting original name.
-
由 Stephen Toub 提交于
* Avoid RegexCode/RegexWriter for all engines other than RegexInterpreter * Address PR feedback
-
由 Jeremy Koritzinsky 提交于
-
由 Vladimir Sadov 提交于
* RestoreContextSimulated * probe for RtlRestoreContext * ntdll.dll * restore self-trap sequence * PR feedback * Clarify CopyContext in RedirectedHandledJITCaseExceptionFilter * simpler indentation. * restore last error on the legacy path. * Update src/coreclr/vm/threads.h Co-authored-by: NDan Moseley <danmose@microsoft.com>
-
由 Ankit Jain 提交于
The project path changed in b4c746b7, causing the project to not get excluded on CI, and causing OOM failures on rolling builds.
-
由 Fred Silberberg 提交于
This method never throws an `ArgumentNullException` for a null `text` input, and is even annotated as accepting `string?`.
-
-
由 Elinor Fung 提交于
-
由 Aleksey Kliger (λgeek) 提交于
* [debug] Handle gen-seq-points, and hot reload updates without PDBs When hot reload is used with dotnet watch, the baseline PDBs are available, and sequence points are enabled, but there are no PDB updates. * [hot_reload] Fix off by one error when counting added and modified rows * [hot_reload] Allow custom attribute deletions, even without ChangeCustomAttributes capability Roslyn seems to delete nullability annotations sometimes * Add regression test for adding static lambdas * param attributes for hot reload * don't run test where it isn't supported
-
由 imhameed 提交于
This change adds support for decompressing ICU data files using the lzfse decompressor built into Apple OSes. If the data file path passed to `GlobalizationNative_LoadICUData` does not have `.lzfse` as a suffix, then the contents of this file will be mapped into shareable memory and passed directly to ICU. Otherwise, the contents are decompressed using a fixed-size working buffer and are stored inside a cache file with a name that contains a decimal encoded representation of the originating compressed file's inode number, modification time, and size. This filesystem metadata is extremely likely to change if the contents of the source file ever changes, so there's no need to compute a checksum of the data to determine if the cache is still valid. If a cache file with an appropriate name is already present then it is mapped into shareable memory and passed to ICU. Stale cache files (defined here to be any file with a filename that ends with "-icudt.dat.uncompressed" that doesn't exactly match the desired cache file name) are purged on startup. `icudt.dat` for mobile is 2126 KiB right now; when compressed with lzfse it shrinks to 675 KiB. On an iPhone SE 1st gen, this takes 4ms to decompress. The "decompression framework" also supports lz4, zlib, and lzma. They are all worse either in decompression time (lzma especially + zlib) or compression ratio (lz4): | Algorithm | icudt.dat compressed size | decompression time | | --------- | ------------------------- | ------------------ | | lz4 | 1031 KiB | 2.41 ms | | lzfse | 675 KiB | 4.20 ms | | zlib | 659 KiB | 9.61 ms | | lzma | 427 KiB | 49.20 ms | I am not comfortable adding 50ms to app startup time. On this same iPhone SE 1st gen, the "Contacts" app takes 166.7ms to display app-generated pixels. This is end-to-end latency, from the first indication that iOS has recognized my finger tap, to the display displaying any non-placeholder content. This was measured with with a 240fps camera. A barebones xamarin-macios app takes 125ms to display a "Hello world!" message. This uses the filename's suffix to control decompression for simplicity, but it would also be possible to instead frame compressed data with a very simple header consisting of a long-enough magic number and a decompressed payload size that can be used as a buffer sizing hint to the decompression loop. Miscellany: - On iOS, the cache-directory appears to be app-specific. Example: `/var/mobile/Containers/Data/Application/0C22E0D1-26CD-46CB-9EBC-6CF55B513ED1/Library/Caches/`. - https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf
-
由 Zoltan Varga 提交于
Revert "[mono][jit] Remove support for -O=-float32, i.e. treating r4 values as r8 on the IL stack. (#65740)" (#66006) This reverts commit e069de87.
-
由 Egor Bogatov 提交于
-
由 dotnet-maestro[bot] 提交于
* Update dependencies from https://github.com/dotnet/linker build 20220223.2 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22123.2 * Update dependencies from https://github.com/dotnet/linker build 20220224.4 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22124.4 * Update dependencies from https://github.com/dotnet/linker build 20220225.2 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22125.2 * Update dependencies from https://github.com/dotnet/linker build 20220228.3 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22128.3 Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
-
由 Viktor Hofer 提交于
Keep Obsolete and EditorBrowsable attributes consistent between ref and src and DefineConst clean-up (#65847) * NET5_0_OR_GREATER, NET6_0_OR_GREATER -> NETCOREAPP The minimum supported .NETCoreApp version in the repository is 6.0, hence both defines can be replaced with the versionless NETCOREAPP one. There is no need to version APIs below the minimum supported .NETCoreApp version. * Sync ObsoleteAttribute between ref and src ApiCompat wasn't enabled to check if the ObsoleteAttribute is in sync between the ref and the src assembly. Enabling it showed numerous mismatches which this commit fixes. Also making sure that the ApiCompat run that compares the live build against the previous version of .NETCoreApp and .NETStandard2.x doesn't complain about ObsoleteAttribute API changes as those are intentional. * Sync EditorBrowsableAttribute between ref and src The EditorBrowsableAttribute attribute wasn't enabled to be checked by ApiCompat and in many cases there were mismatches. The most prominent were InteropServices. * HttpListenerContext pr feedback * ResourceManager pr feedback * Json PR feedback * Fix cryptography PNSE build
-
由 Michael Ketting 提交于
The nullability of parameter 'destinationType' in TypeConverter.CanConvertTo(...) was changed from not-nullable to nullable during the development of .NET 6. Since a destination type supported by this TypeConverter can never be null, a NotNullWhenAttribute is added to the 'destinationType' parameter when the result value of TypeConverter.CanConvertTo(...) is 'true'. Fix #63186
-
由 Bruce Forstall 提交于
* Remove reference to deleted setup-stress-dependencies.cmd/sh Automatically download and copy coredistools.dll to the libraries testhost. * Remove reference to setup-stress-dependencies.cmd/sh scripts This is in the libraries gcstress pipeline. It is no longer necessary. * Set a huge timeout for GCStress
-
由 Lakshan Fernando 提交于
* Add nativeaot trim annotations experiment * Fix mono libraries * Update src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.cs Co-authored-by: NEric Erhardt <eric.erhardt@microsoft.com> * FB on attribute message * FB * missed nativeaot message change Co-authored-by: NEric Erhardt <eric.erhardt@microsoft.com>
-
由 Ankit Jain 提交于
* [wasm] Fix a race condition in adding payloads for helix The issue shows up only in Wasm.Build.Tests for the `TestUsingWorkloads!=true` case, as `clang --version` failing with: ``` /datadisks/disk1/work/A0100914/p/build/emsdk/upstream/bin/clang: error while loading shared libraries: libLLVM-13git.so: cannot open shared object file: No such file or directory (TaskId:231) ``` For this non-workloads testing case, we copy `emscripten` from the system copy to the git checkout. And then use that directory for the payload. The build logs show that the missing file (`libLLVM-13git.so`) does get copied as part of copying `/usr/local/emscripten/emsdk` to `$(RepoRoot)/src/mono/wasm/emsdk`. But the file, and a few others seem to be missing in the final helix payload. We add `emsdk` to the payload for target path `build/emsdk`. But a recent change also added `node` for this case with a target path `build/emsdk/node`, with an overlapping path with `build/emsdk`. I believe this is causing an issue where these directories are being processed in parallel, and cause some files get missed. This commit: 1. Add `node` only when needed (skip WBT for example); 2. Use a non-overlapping path for `node`, `build/emsdk-node`. Fixes https://github.com/dotnet/runtime/issues/65956 * Change `_HelixLocalNodePath` evaluation order Co-authored-by: NRadek Doulik <radekdoulik@gmail.com>
-
由 Peter Sollich 提交于
I observed that the inlined call to clear_brick_table in clear_region_info took more CPU samples than necessary - it's about 7x faster to call memset than it is to code a straighforward loop.
-
- 01 3月, 2022 13 次提交
-
-
由 Adam Sitnik 提交于
* add missing GC.SuppressFinalize(this) to FileStream.DisposeAsync * DerivedFileStreamStrategy.DisposeAsync does not need to call _fileStream.BaseDisposeAsync, as FileStream.DisposeAsync calls Dispose(false) now
-
由 Eirik Tsarpalis 提交于
* Use ConvereterStrategy.Object in ObjectConverter * address feedback
-
由 Stephen Toub 提交于
-
由 Zoltan Varga 提交于
* [mono][wasm] Allow AOTing methods with catch clauses. This works as follows: * During EH, when a catch clause is found in an AOTed method, the EH state is saved into TLS and a c++ exception is thrown. * The C++ exception is caught by the AOTed method, and the landing pad code calls mono_llvm_resume_exception_il_state (). * That call will run the catch clause and the rest of the method code using the interpreter, storing the possible return value back into the AOTed method's stack frame. * After the call, the method skips the rest of its code, and returns immediately to its caller. * Fix console bench sample. * Fix landing pads. * Fix issues. * Add support for filter clauses. * Implement all wasm return conventions. * Fix arg/local write back. * Avoid throwing a c++ exception from do_jit_call () so the caller can clean up the interpreter stack. * Disable AOTing some more assemblies on CI. * Rename llvmonly EH functions to mini_llvmonly_ for clarity. * Improve unwinding through interpreter frames. Instead of throwing a c++ exception from mono_handle_exception () when an exception is caught in AOTed code, set context->has_resume_state, so the intepreter will normally unwind until exiting interpreted code. Then throw the c++ exception after the call to interp_exec_method () to unwind through the runtime code and the AOTed frames which can't handle the exception.
-
由 Vladimir Sadov 提交于
* null-check the redirect context before using. * tweak the comment * do not allocate context if InitializeContext has unexpected results.
-
由 Jan Kotas 提交于
Fixes #65573
-
由 Bruce Forstall 提交于
* Fix GC hole with multi-reg local var stores Change #64857 exposed an existing problem where when generating code for a multi-reg GT_STORE_LCL_VAR, if the first register slot was not enregistered, but the second or subsequent slots was, and those non-first slots contained GC pointers, we wouldn't properly add those GC pointers to the GC tracking sets. This led to cases where the register lifetimes would be killed in the GC info before the actual lifetime was complete. The primary fix is to make `gtHasReg()` handle the `IsMultiRegLclVar()` case. As a side-effect, this fixes some LSRA dumps that weren't displaying multiple registers properly. There are about 50 SPMI asm diffs on win-arm64 where register lifetimes get extended, fixing GC holes. I also made `GetMultiRegCount()` handle the `IsMultiRegLclVar()` case. I made a number of cleanup changes along the way: 1. Fixed two cases of calling `gcInfo.gcMarkRegSetNpt` with regNumber, not regMaskTP 2. Marked some functions `const` 3. Improved some comments 4. Changed "ith" to "i'th" in comments which still doesn't read great, but at least I'm not left trying to parse "ith" as an English word. 5. Use `OperIsScalarLocal()` more broadly 6. Renamed `gtDispRegCount` to `gtDispMultiRegCount` to make it clear it only applies to the multi-reg case. Fixes #65476. * Update src/coreclr/jit/gentree.cpp Co-authored-by: NKunal Pathak <Kunal.Pathak@microsoft.com> Co-authored-by: NKunal Pathak <Kunal.Pathak@microsoft.com>
-
由 Elinor Fung 提交于
Move diagnostics for invalid GeneratedDllImportAttribute usage to generator instead of analyzer (#65915)
-
由 Stephen Toub 提交于
* Add regex "unit tests" test project This follows the convention used by the networking tests, which typically have two distinct test projects per library: functional tests and unit tests. The former are what we typically refer to as our tests for a library, whereas the latter build product source into the test project in order to directly validate internals (an alternative to this is to use InternalsVisibleTo, but that negatively impacts trimming and makes it more challenging to maintain a property boundary for the functional tests). All the existing tests are moved unedited into the FunctionalTests, and a new UnitTests project is added with some initial tests for the RegexTreeAnalyzer code. The generator parser tests were also consolidated into the functional tests, as there's no longer a good reason for those few tests to be separate. I fixed a few bugs in RegexTreeAnalyzer as a result. In particular, we were over-annotating things as potentially containing captures or backtracking because in the implementation we were using the lookup APIs meant to be used only once all analysis was complete. This doesn't have a negative functional impact, but it does negatively impact perf of compiled / source generator, which then generate unnecessary code. We were also incorrectly conflating atomicity conferred by a grandparent with atomicity conferred by a parent; we need MayBacktracks to reflect only the atomicity directly contributed by a node, not by its parent's influence, as we need the parent to be able to understand whether the child might backtrack. * Add some unit tests for RegexFindOptimizations * Address PR feedback
-
由 Kevin Jones 提交于
This corrects two uses of RandomNumberGenerator that resulted in slight bias in their results.
-
由 Viktor Hofer 提交于
* Make Is*Project properties unambiguous Currently these properties exist which categorize projects: - IsReferenceAssembly: The project's parent directory is 'ref' - IsGeneratorProject: The project's parent directory is 'gen' - IsTestProject: The project is located somewhere under a '/tests/' directory and the project name's suffix is either '.Tests' or '.UnitTests'. - IsTrimmingTestProject: Same as IsTestProject but the project name's suffix is '.TrimmingTests'. - IsTestSupportProject: The project is located somewhere under a '/tests/' directory and the above IsTestProject property is false. - UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK - UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK - IsRuntimeAssembly: True when all above is false - IsSourceProject: True when the project's parent directory is 'src' The IsRuntimeAssembly and IsSourceProject properties meanings are ambiguous and the property names aren't consistent (IsReferenceAssembly vs IsGeneratorProject). I'm changing the above to the following: - **IsReferenceSourceProject: The project's parent directory is 'ref' or the parent of the parent directory is 'ref'** - IsGeneratorProject: The project's parent directory is 'gen' - IsTestProject: The project is located somewhere under a '/tests/' directory and the project name's suffix is either '.Tests' or '.UnitTests'. - IsTrimmingTestProject: Same as IsTestProject but the project name's suffix is '.TrimmingTests'. - IsTestSupportProject: The project is located somewhere under a '/tests/' directory and the above IsTestProject **and IsTrimmingTestProject** props are false. - UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK - UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK - IsSourceProject: **True when all above is false.** * React to PR feedback
-
由 Steve Sanderson 提交于
-
由 Viktor Hofer 提交于
* Update GenAPI usage and code clean-up
-
- 28 2月, 2022 2 次提交
-
-
由 Parker Bibus 提交于
* Setup pipeline for testing. * First test with the Maui Version. * Remove perf-job parameter version typo. * Try another way of doing the output variable. * Third times the charm? * Add a second test for two to be done in one run. * Fix variable problem with xplat-setup.yml * Third time was not the charm... * Try another setup. * Only include one of the tests as the perf setup is failing potentially due to this. * Try 2 variable attempts and write out potential get methods. * Remove failed thing and split them to all be seperate and always run. * Move variables into the second job stuff. * Won't run when specified under the job parameters. * Try hardcoded values to see if it is the output or input that seems to not be connected properly. * Try new variable format. * Missed bracket that wasn't found until after most of the way through. * Maui installs are failing, work around this for variable testing. * Need to keep mono build enabled. * Revert "Need to keep mono build enabled." This reverts commit ff32e46c080efb8a103907de6dd1a13cd0d1be04. * Revert "Maui installs are failing, work around this for variable testing." This reverts commit 6dbf6b0ee26d8047d14be86e12e56872c7dab7cc. * Temp fix for workload install. * Removed breaking variable test as the new format works along with changing to only having one variable for testing. This should allow us to have access to the maui version in the perf setup for testing. * Full run test. Still using perf repo fork. * Add comment explaining RetrievedMauiVersion. * Add maui version to the iOS runs. * Undo testing changes to prepare for merge once install is working again.
-
由 Jeff Handley 提交于
* Update comment in BinaryFormatterWriter to indicate a NRT bug won't be fixed * Update comment to reflect known issue in .NET Framework * Update comment to indicate a known issue
-
- 27 2月, 2022 2 次提交
-
-
由 SingleAccretion 提交于
It is the case that the IR supports the "zero" node for structs in two positions: on the RHS of an assignment (InitBlk form) and under a return, in case the ABI return type is scalar. Meanwhile, assertion propagation "blindly" replaced structs with zeroes, and so workarounds had to be applied in order for the IR to remain valid, in the form of the NO_CSE flag, applied either explicitly (multi-reg returns) or implicitly (ADDR(LCL) created by "impNormSturctVal" for call args). This was: a) A CQ problem in cases where we forgot to clear the NO_CSE flag when the node's parent was updated, say after inlining. b) A burden for enabling struct LCL_VAR arguments, as one had to remembered to mark them NO_CSE in all situation. This change fixes the problem by deleting propagation of zeroes for local uses, instead propagating them as part of their parents (ASGs and RETURNs). This has the CQ benefits of not being affected by stale NO_CSEs and the drawback of not participating in the "chained" propagation, where we first copy-propagated something, and then zero-propagated into the new local as well. These cases seem rather rare, so I decided not to spend TP on fixing them by looking at the copy assertions in the new code. This change also deletes the zero propagation code for SIMDs. It was only useful in cases we had a promoted SIMD field that was zero-inited via an InitBlk on the parent struct. That promotion code was (and is) creating nodes that look like integral constants, except they are of TYP_SIMD. We should delete that form and use proper SIMD zero nodes instead, and design the propagation story for them separately.
-
由 Stephen Toub 提交于
-
- 26 2月, 2022 3 次提交
-
-
由 Jose Perez Rodriguez 提交于
* Adding Regex.IsMatch(Span) and RegexRunner.Scan() methods * Addressing some PR Feedback * Fixing case where span-based APIs are called from a precompiled regex and adding a test for it. * Adding Tests for IsMatch span overload * Refactor Run<TState> and Run to share centralized logic * Emit IsBoundary and IsECMABoundary instead of exposing them. * Address Emitter changes feedback. * Addressing PR Feedback. * Addressing most of the PR comments * Fix issue where runtextbeg and length do not match the size of the input * Add Precompiled tests for all overloads of methods. * Fix precompiled test failing in non-Windows due to new lines. * Apply suggestions from code review Co-authored-by: NStephen Toub <stoub@microsoft.com> * Addressing more PR Feedback * Fix protected Scan method * Addressing feedback and adding more tests * Fix few failing tests in Mono runtime Co-authored-by: NStephen Toub <stoub@microsoft.com>
-
由 Alexander Köplinger 提交于
This allows us to remove a bunch of huge tables that weren't actually needed. Removes support for setting MONO_EXTERNAL_ENCODINGS env var which is discouraged. Also removes the code for .mdb debug symbol support which was already disabled everywhere.
-
由 Andy Ayers 提交于
Fix OSR jitstress failures by disabling STRESS_LCL_FLD for two cases: * for Tier0 methods with patchpoints (because patchpoint info generation does not produce the right offsets when locals are padded) * for OSR locals in OSR methods (because they live on the Tier0 frame and so can't have their storage altered. Enable struct promotion for OSR locals. In most cases this ends up being dependent promotion. Enabling independent promotion will take more work.
-