1. 28 9月, 2022 23 次提交
  2. 27 9月, 2022 17 次提交
    • Z
      [mono][aot] Prefer specific instances instead of gshared for methods... · c7c6aa03
      Zoltan Varga 提交于
      [mono][aot] Prefer specific instances instead of gshared for methods containing static virtual calls. (#76033)
      
      These calls cannot be resolved at compile time in gshared methods, so they cannot be inlined etc.
      They are used in perf sensitive BCL code like SpanHelpers. To fix this, modify the AOT compiler
      so in addition to the gshared versions, it emits specific instances of these methods if possible.
      This only affects a small subset of gshared methods so it doesn't lead to a noticable code size increase.
      
      Fixes https://github.com/dotnet/runtime/issues/75801.
      c7c6aa03
    • S
      Fix incorrect string length calculation (#76127) · 94c6fe6c
      Sparin 提交于
      ANSI string depends on system encoding charset. Unix's implementation of Marshal.StringToHGlobalAnsi encodes in UTF8. UTF8 characters which are out of 8-bit range (otcet) encodes in multiple bytes (otcets). ASCII characters usually are in 0x00-0x7F range but cyrillic and other characters are not. For example, 'Зфыы123;' (eq. 'Pass123$') will be encoded in 12 bytes instead of 8
      
      Fix #76125
      94c6fe6c
    • S
      Improve IPAddress to/from bytes perf (#75872) · 36bd4286
      Stephen Toub 提交于
      * Improve IPAddress to/from bytes perf
      
      Also cleaned up some unnecessary `!`s with `MemberNotNullWhen`.
      
      * Address PR feedback to use shifts instead of shuffle
      
      And also simplify fallback.
      
      * Avoid non-portable cast for big endian
      36bd4286
    • A
      JIT: refactor and enhance the redundant branch optimizer (#76207) · 80f72346
      Andy Ayers 提交于
      One more preparatory step before introducing the new phi-based
      disambiguation.
      
      * handle some cases of ambiguous preds better
      * split out the jump threading pre checks into a helper
      * properly support updating switch preds
      * generalize retry logic a bit to handle more cases
      80f72346
    • 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