1. 27 9月, 2022 16 次提交
    • S
      Extend RuntimeHelpers.IsBitwiseEquatable to more types (#75640) · c10520db
      Stephen Toub 提交于
      * Extend RuntimeHelpers.IsBitwiseEquatable to more types
      
      Today, RuntimeHelpers.IsBitwiseEquatable is hardcoded to a fixed list of types.  This means that almost all of the vectorization we've done with arrays and spans is limited to just those types; developers can themselves use MemoryMarshal.Cast to convert spans of other types to spans of supported one, but it doesn't naturally happen.
      
      This extends IsBitwiseEquatable a bit more. We already have a CanCompareBitsOrUseFastGetHashCode helper used by ValueType.Equals to determine whether structs that don't override Equals can be compared with the equivalent of memcmp.  This extends that same helper to be used by IsBitwiseEquatable.  However, IsBitwiseEquatable also needs to rule out types that implement `IEquatable<T>` (the existing helper doesn't because it's about the implementation of the object.Equals override where the interface doesn't come into play).
      
      The upside of this is APIs like Array.IndexOf will now automatically vectorize with more types.  The main downside is that types which provide their own equality implementation still don't benefit, which in turn means adding an `IEquality<T>` implementation could in the future be a deoptimization (we should consider some kind of attribute or marker interface a type can use to say "I promise my equality implementation is the same as a bitwise comparison").  We also currently constrain most of our MemoryExtensions methods to types that implement `IEquatable<T>`, so there are only a handful of public methods today that benefit from this.
      
      * Fix contract on CanCompareBitsOrUseFastGetHashCode
      
      * Add more SequenceEqual tests
      
      * Remove duplicative check
      
      * Add IsBitwiseEquatable extension to ilc
      
      * Address PR feedback
      
      * Update src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs
      c10520db
    • W
      Fix LoggerMessageGenerator parser to check for expression bodied method (#75601) · b2af65a4
      Wei Chen 提交于
      * Check for expression bodied method
      
      Fixed LoggerMessageGenerator parser to check for expression bodied
      method and generate a proper diagnostic message.
      
      Fix #66080
      
      * Fix expression body in test
      
      Fixed invalid expression body in test
      b2af65a4
    • J
      Revert "Allocate RuntimeType objects on Frozen Object Heap (#76235) · 91706f19
      Jan Kotas 提交于
      * Revert "Allocate RuntimeType objects on Frozen Object Heap (#75573)"
      
      This reverts commit 1f1231c3.
      
      * Revert "don't use write barriers for frozen objects (#76135)"
      
      This reverts commit 315bdd4c.
      91706f19
    • T
      Use generated runtime.json when building shared framework packages. (#76068) · cd2f0ffb
      Tom Deseyn 提交于
      * Use generated runtime.json when building shared framework packages.
      
      * Don't UpdateRuntimeJson on Build.
      
      * PR feedback.
      
      * Update Microsoft.NETCore.Platforms.csproj
      Co-authored-by: NViktor Hofer <viktor.hofer@microsoft.com>
      cd2f0ffb
    • S
      Nullable annotations for System.Security.Cryptography.Xml (#67198) · 00756394
      Steve Dunn 提交于
      * First pass
      
      * More annotations
      
      * Rever mistaken change to test
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * More annotations
      
      * Remove red flag comment
      
      * PR feedback
      
      * Remove 'red flag' comments
      
      * Revert unintended changes to tests
      
      * Revert unintended changes
      
      * PR feedback: remove redundant !'s from things that can never return null
      
      * Added  `[MemberNotNullWhen(true, nameof(_cachedXml))]` on implementation.
      
      * Updated ref t ypes (with `dotnet msbuild /t:GenerateReferenceAssemblySource`)
      
      * Updated ref assembly
      
      * PR feedback: add `MemberNotNull` attribute on `Initialize`)
      
      * Updated ref again
      
      * Put `MemberNotNull` attribute on the getter rather than the property in the reference file.
      
      * PR feedback: remove MemberNotNullWhenAttribute from ref
      
      * PR feedback: non nullable param to match method in base class
      
      * Fix post-merge build errors
      
      * PR feedback
      
      * PR feedback from @bartonjs - add [DisallowNull] and cascade
      
      * PR feedback
      
      * PR feedback
      
      * PR feedback
      
      * Fix build again, by removing the `protected internal` property `CacheValid`
      
      * PR feedback
      
      * Added back `CacheValid` based on PR comment
      
      * Fix issues from recent rebase
      
      * Add `DisallowNull` attribute to ref file and remove it from `DefaultGenApiDocIds.txt`
      
      * PR feedback
      
      * Fix issues from recent merge
      
      * Remove some more extraneous damnit operators
      
      * Fix NRT analysis errors after prior rebase
      
      * PR feedback
      
      * PR feedback
      
      * PR feedback
      
      * PR feedback
      
      * PR feedback
      
      * CipherReference and CipherValue made to disallow null
      
      * Make Uri non-nullable on EnctrypedReference
      
      * Add AllowNull attribute on EncryptedType::KeyInfo
      
      * AllowNull on EncryptedXml::Recipient
      
      * Made baseUri nullable
      
      * DisallowNull on PropertlyElement
      
      * AllowNull on SignedInfo::CanonicalizationMethod
      
      * AllowNull on SignedXml::EncryptedXml
      
      * Fix build after recent rebase
      
      * Remove redundant damnit operator now that https://github.com/dotnet/runtime/pull/71860 has been merged
      
      * PR feedback
      
      * Fix build due to change of the CanonicalXmlElement constructor
      
      * PR feedback
      
      * Remove redundant damnit operators
      
      * Fix broken tests
      
      * Fix issues after rebase
      
      * PR feedback
      
      * PR feedback
      00756394
    • M
      74642 change isostorage path (#75541) · bc27a6a7
      Meri Khamoyan 提交于
      * #74642 changed isolated storage path for mobile platforms
      bc27a6a7
    • M
      [mono] Add Vector128 AndNot intrinsic for amd64 (#74586) · a7ae0720
      Matous Kozak 提交于
      * Vector128 AndNot
      
      * swap operands for Vector128, block AndNot for integer types
      
      * fix AndNot intermediate type for Vector64
      
      * move AndNot to XBINOP from SSE
      
      * AndNot intrinsics move check outside ifdef
      
      * defined macro
      
      * use different tmp variable
      
      * Re-use OP_SSE_ANDN code
      
      * remove space
      
      * missing {} in SN_AndNot case
      a7ae0720
    • S
      Fix spilling of `MUL_LONG` on x86 and multi-reg HWIs (#73079) · ee10ed15
      SingleAccretion 提交于
      * Spilling fixes
      
      * Unspilling fixes
      
      * Fix multi-reg HWIs
      ee10ed15
    • D
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets... · 7fc8fb56
      dotnet-maestro[bot] 提交于
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/runtime dotnet/emsdk (#76120)
      
      [main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/runtime dotnet/emsdk
      7fc8fb56
    • H
      Fix bugs found from static analyzer (#76160) · 8b19f23d
      Hyungju Lee 提交于
      * Fix bugs found from static analyzer
      Co-authored-by: NJan Kotas <jkotas@microsoft.com>
      8b19f23d
    • M
      Fix some incorrect SpecialFolder entries for Unix (#68610) · 62db3613
      Miepee 提交于
      * Fix incorrect SpecialFolder entries for Unix
      
      This fixes an incorrect Documents/Personal for Linux+Mac entry,
      incorrect Videos Mac entry,
      and an incorrect (Local) ApplicationData Mac entry.
      
      Fix #63214
      
      * Don't make Unix tests assume Personal is Home
      
      * Use the same value for Mac's (Local)ApplicationData
      
      * Use NSPaths for OSX Special Folder
      
      The Apple documentation recommends to use these instead of hardcoding the paths, so the paths that had NSPath equivalents have been replaced.
      
      * Change System.Native CMakeLists to include OSX for SearchPath
      
      `a17e73466ca639388a3d89f4d6be0ab9703802fc` made OSX call the native NSearchPath functions, however a stub was initially called. This fixes it to call the native functions.
      62db3613
    • T
      [mono][debugger] fix exception while decoding value that has a byref field (#75774) · fec8aeb7
      Thays Grazia 提交于
      * fix exception while decoding value that has a byref field
      
      * Apply suggestions from code review
      Co-authored-by: NLarry Ewing <lewing@microsoft.com>
      Co-authored-by: NLarry Ewing <lewing@microsoft.com>
      fec8aeb7
    • K
      Fix assertion in corhlpr (#76189) · 5024a648
      Kevin Gosse 提交于
      5024a648
    • B
      Disallow TimeSpan.Zero in rate limiters (#75496) · a889912c
      Brennan 提交于
      a889912c
    • N
      Resolve missing triple-slash in Microsoft.Extensions.Primitives (#76098) · b914bb6d
      Nick Stanton 提交于
      * Add triple slash in missing areas
      
      * Apply suggestions from code review
      Co-authored-by: NCarlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
      
      * Rewrite StringSegmentCompare GetHashCode() summary
      
      * implement GetHashCode() feedback
      
      * change instances to objects
      Co-authored-by: NCarlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
      b914bb6d
    • E
      Remove hardcoded limit in deserialization constructor arguments (#75982) · 3f0106ae
      Eirik Tsarpalis 提交于
      * Remove hardcoded limit in deserialization constructor arguments.
      
      * Use correct opcode for indices >= 128
      
      * Remove unneeeded changes
      
      * Add reflection fallback in interpreted runtimes
      
      * Revert "Add reflection fallback in interpreted runtimes"
      
      This reverts commit e78ea20c532860d21bd0540a97ebfd1cf02370e3.
      
      * disable test in interpreted mono
      
      * Revert "disable test in interpreted mono"
      
      This reverts commit 53f7a913b710471eadad18f50e962f0f967e07aa.
      3f0106ae
  2. 26 9月, 2022 11 次提交
  3. 25 9月, 2022 6 次提交
  4. 24 9月, 2022 7 次提交
    • J
      Fix native aot test failures (#76114) · e823a080
      Jan Kotas 提交于
      * Fix native aot test failures
      
      * Fix test failure on NativeAOT with non-English locale
      
      * Delete duplicate and dead files
      
      Fixes #75699
      Co-authored-by: NFilip Navara <filip.navara@gmail.com>
      e823a080
    • J
      SPMI: Add and utilize number of contexts with diffs (#76011) · 985eedd6
      Jakob Botsch Nielsen 提交于
      Previously, if there was any diff in a collection, that collection would
      be shown in all tables (i.e. Overall, FullOpts, MinOpts). The main
      reason was that we only had "has diffs" information on a per-collection
      basis, not for each of the categories. This changes SPMI to communicate
      back for each category how many contexts had diffs in them, and uses
      this to hide tables/rows without any diffs, and to show this information
      under details.
      985eedd6
    • V
      Add back missing conv opcodes when compiling via System.Linq.Expressions (#76024) · 05aa1fdf
      Vlad Brezae 提交于
      * Add new convert tests
      
      With expression funcs that return int32 instead of short/byte to prevent implicit conversions.
      
      * Add back missing conv opcodes when compiling via System.Linq.Expressions
      
      The conversion opcodes are still necessary when the sign of the value might change, in which case the conversion opcode will do a sign/zero extend to the full i32 storage used by the IL execution stack.
      
      For example, before this change, conversions from ushort to short were ignored. Consider expressions converting the value `ushort.MaxValue` to short (testcase ConvertUShortToShortTest). `ushort.MaxValue` will be pushed to execution stack as a i32 ldc of value 0xffff. The conv.i2 opcode would change the value on the stack to 0xffffffff so it shouldn't be omitted.
      05aa1fdf
    • T
      Fix impIntrinsic to not raise asserts for the AltJit scenario (#76048) · 901b0a1e
      Tanner Gooding 提交于
      * Fix impIntrinsic to not raise asserts for the AltJit scenario
      
      * Respond to PR feedback
      
      * Specially handle NI_Vector64/128/256_* intrinsics where not all overloads are valid
      
      * Change the AltJit intrinsic handling so we get no asserts
      
      * Apply suggestions from code review
      Co-authored-by: NJan Kotas <jkotas@microsoft.com>
      
      * Apply suggestions from code review
      
      * Fixing a build error
      
      * Applying formatting patch
      Co-authored-by: NJan Kotas <jkotas@microsoft.com>
      901b0a1e
    • T
      [wasm][debugger] Support create, debugging and running wasmbrowser template from VS (#75986) · 5ab83492
      Thays Grazia 提交于
      * Support create, debugging and running wasmbrowser template from VS
      
      * addings extra line in the end of the file
      
      * remove extra spaces
      
      * fix compilation error
      
      * adding extra line in the end of the file
      
      * Addressing @lewing comment.
      5ab83492
    • M
      [tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT (#75730) · 74c589f3
      Mitchell Hwang 提交于
      * Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT
      
      * Condition each XslCompiledTransformApi test class on IsReflectionEmitSupported
      Co-authored-by: NJan Kotas <jkotas@microsoft.com>
      74c589f3
    • W
      [JIT] CodeGen verification testing (#75102) · 7681692b
      Will Smith 提交于
      * Add test
      
      * Add CHECKs
      
      * Build scripts and test settings
      
      * COMPlus -> DOTNET
      
      * Fix filenames
      
      * Missing >
      
      * Missing quotes
      
      * use %scriptPath%
      
      * Rework properties, start two examples
      
      * Arch demo
      
      * Cleanup
      
      * Remove tab
      
      * Easier environment variables.  Undo precommand changes.
      
      * undo blank line
      
      * clean CHECKs
      
      * Draft of bash
      
      * Bash, conditionals
      
      * More variables, start on run.cmd/sh/py
      
      * another output
      
      * Support in cmd/bash for RunningDisasmChecks
      
      * copy, factor, formatting
      
      * Initial work to include FileCheck. Added SuperFileCheck.
      
      * Able to build SuperFileCheck
      
      * Do not DisasmCheck TypeEquality_r for now. Update some FileChecks to follow SuperFileCheck rules.
      
      * Partially wiring up SuperFileCheck to tests
      
      * Piping list of method names from SuperFileCheck to JitDisasm
      
      * Handling bash a little bit
      
      * Moving SuperFileCheck to tests/Common
      
      * Few tweaks
      
      * Building SuperFileCheck as part of the test build
      
      * Tweaking a few things
      
      * Fixed a bug
      
      * Moving SuperFileCheck back to src\coreclr\tools. Removed checks from TypeEquality_r.
      
      * Restore original logic in Runtime_73681
      
      * Trying to add CI leg for disasmchecks
      
      * Use x64 package if x86 platform detected for JIT tools package
      
      * Remove innerloop for disasmchecks
      
      * Trying to fix build. Only run in Windows for now.
      
      * Update Runtime_73681.cs
      
      Trying to fail test
      
      * Trying to fix build
      
      * Update Runtime_73681.cs
      
      * Update Runtime_73681.cs
      
      * Fixing a few issues
      
      * Trying to run disasmchecks as part of CI
      
      * Trying to run disasmchecks
      
      * Trying to run disasmchecks
      
      * Trying to run disasmchecks
      
      * Revert a change
      
      * Trying to run disasmchecks
      
      * Trying to run disasmchecks
      
      * build SuperFileCheck on non-windows
      
      * few tweaks
      
      * Trying to fix CI
      
      * Including SuperFileCheck for tests
      
      * Cleanup
      
      * More cleanup
      
      * Cleanup
      
      * Changed SuperFileCheck to not publish everything. Changed SuperFileCheck's lookup for FileCheck.
      
      * Invoking SuperFileCheck using dotnet
      
      * Making the test pass
      
      * Only run disasm checks for coreclr and not mono
      
      * Using HasBatchDisasmCheck and HasBashDisasmCheck to determine to run the check
      
      * Enabling filecheck on linux and osx
      
      * Added more comments
      
      * Added ARM64 specific test. Do not run SuperFileCheck if no methods were found.
      
      * Added documentation. Changed disasm-output.
      
      * Minor doc tweak
      
      * Minor doc tweak
      
      * Minor doc tweak
      
      * Minor doc tweak
      
      * Minor doc tweak
      
      * Cleanup. Trying to fix linux
      
      * Fixing test
      
      * Add information on additional functionality
      
      * cleanup
      
      * Add FileCheck snippet
      
      * Undo environment variable changes
      
      * Feedback from Mark
      
      * Cleanup
      
      * Trying to fix linux test run
      
      * Trying to fix linux test run
      
      * A few missing changes from the original branch
      
      * Enable OSX for disasm checks
      
      * cleanup / comment
      
      * Force test failure
      
      * Update Runtime_73681.cs
      
      * Set env vars after errorlevel check
      
      * Reverting back on setting environment variables in test. Added new FileCheck test for mod optimization
      
      * Force a failure by changing the register
      
      * Ignore native binaries for superpmi collect
      
      * Update Runtime_34937.cs
      
      * Force the correct failure
      
      * Update Runtime_34937.cs
      
      * Update Runtime_34937.cs
      
      * Adding specific OS check prefixes. Changed dump-input context amount
      
      * Added getting fully qualified method names with wildcards for SuperFileCheck
      
      * More tests. Fixed a few issues with generics.
      
      * Disabling generic support
      
      * Error if it cannot find enclosing type declaration
      
      * Fixing build
      
      * Remove namespac
      
      * Bring generics back, but in a limited form
      Co-authored-by: NMark Plesko <markples@microsoft.com>
      7681692b