1. 17 11月, 2021 12 次提交
  2. 16 11月, 2021 25 次提交
    • J
      Fix poisoning for very large structs (#61521) · 9a9a4f34
      Jakob Botsch Nielsen 提交于
      For very large structs poisoning could end up generating instructions
      requiring larger local var offsets than we can handle which would hit an
      IMPL_LIMIT that throws InvalidProgramException. Switch to using rep
      stosd (x86/x64)/memset helper (other platforms) when a local needs more
      than a certain number of mov instructions to poison.
      
      Also includes a register allocator change to mark killed registers as
      modified in addRefsForPhysRegMask instead of by the (usually) calling
      function, since this function is used directly in the change.
      9a9a4f34
    • E
      Disable fgMorphCastedBitwiseOp opt for floats (#61657) · bd0c5431
      Egor Bogatov 提交于
      bd0c5431
    • E
      [arm64] JIT: Make 0.0 containable for fcmp (#61617) · c3973270
      Egor Bogatov 提交于
      c3973270
    • B
      Fix SuperPMI Python script Azure usage (#61650) · 0d11ae83
      Bruce Forstall 提交于
      The on-demand Azure module load was refactored to jitutil.py,
      but that requires some cross-module importing to work. Do the
      minimal required to make this work.
      0d11ae83
    • L
      Provide locations for src-gen diagnostic output (#61430) · a89debf8
      Layomi Akinrinade 提交于
      * Provide locations for src-gen diagnostic output
      
      * Fix tests and address feedback
      
      * Add defensive check for context type location
      a89debf8
    • K
      XArch: Trim the code block to match the actual code length (#61523) · 4d824632
      Kunal Pathak 提交于
      * Trim the hot code size to the actual code length
      
      * Remove allocatedHotCodeSize field
      
      * Remove verbose logging
      
      * Perform trimming only for xarch
      
      * Include more comment about armarch
      
      * Fix the condition for arm64
      4d824632
    • K
      Add tests for CNG symmetric key algorithm mismatches · 56acd2ed
      Kevin Jones 提交于
      56acd2ed
    • B
      Obsolete thumbtacked AssemblyName properties (#59522) · e10532af
      Bar Arnon 提交于
      * Obsolete thumbtacked AssemblyName properties
      
      Fix #59061
      
      * Ignore obsoletion
      
      * Fix pragma
      
      * Merge the AssemblyName member obsoletions into a single diagnostic id
      
      * Fix pragma to use updated diagnostic id
      
      * Suppress SYSLIB0037 in reflection tests
      
      * Suppress SYSLIB0037 warnings
      Co-authored-by: NJeff Handley <jeffhandley@users.noreply.github.com>
      Co-authored-by: NJeff Handley <jeff.handley@microsoft.com>
      e10532af
    • E
      d471a03d
    • S
      3b71d3b0
    • S
      Delete impCheckForNullPointer (#61576) · 2e97ac49
      SingleAccretion 提交于
      The comment above the method mentions "many problems" with leaving
      null pointers around, but it is unclear what kind of problems. I can
      only speculate those were the problems in legacy codegen which "could
      not handle constant op1".
      
      It also mentions that "we cannot even fold (null+offset)", which is
      incorrect: "gtFoldExprConst" does in fact fold such expressions to
      zero byrefs. It is also the case that spilling the null into a local
      affects little as local assertion propagation happily propagates the
      null back into its original place.
      
      There was also a little bug associated with the method that got fixed:
      morph was trying to use it, and in the process created uses of a local
      that was not initialized, since the statement list used by the method
      is the importer's one, invalid in morph.
      2e97ac49
    • P
      [wasm] parallel asset loading (#61610) · 5d3e70a4
      Pavel Savara 提交于
      5d3e70a4
    • T
      Adding support for X86Base.Pause() and ArmBase.Yield() (#61065) · fdafc7c0
      Tanner Gooding 提交于
      * Adding support for X86Base.Pause() and ArmBase.Yield()
      
      * Applying formatting patch
      
      * Ensure NI_ArmBase_Yield actually gets through to codegen on arm64
      fdafc7c0
    • S
      Create runtime staging clone to manually kick off full test runs (#61443) · a93e0d22
      Steve Pfister 提交于
      This change allows devs to manually kick off full test runs on the configurations that only execute smoke tests per PR.
      
      /azp runtime-staging-manual will do the trick
      a93e0d22
    • B
      Loop refactoring and commenting improvements (#61496) · fb6cf5cc
      Bruce Forstall 提交于
      - Remove unneeded FIRST concept in loop table; it was always equal to TOP.
      - Rename optMarkLoopsBlocks to optScaleLoopBlocks to more accurately describe
      what it does. More consistently report block scaling in the dump
      - Create optMarkLoopHeads. This was refactored out of fgRemoveUnreachableBlocks so
      it can be called in a more logical location (at the beginning of optFindLoops),
      and only does one thing.
      - fgMakeOutgoingStructArgCopy: remove unused `argIndex` argument; reorder calls to
      fgMightHaveLoop.
      - Update and write a bunch of comments; convert away from `/* */` style comments.
      fb6cf5cc
    • J
      f3228da4
    • S
      Delete dead code (#61533) · f01cd8d7
      SingleAccretion 提交于
      * Delete regArgList
      
      Unused.
      
      * Delete CountSharedStaticHelper
      
      Unused.
      
      * Delete GTF_RELOP_QMARK
      
      Unused.
      
      * Delete lvaPromotedStructAssemblyScratchVar
      
      Unused.
      
      * Delete dead code from fgMorphSmpOp
      
      The conditions tested constitute invalid IR.
      
      * Delete gtCompareTree
      
      Unused.
      
      * Delete gtAssertColonCond
      
      Unused.
      
      * Delete IsSuperPMIException
      
      Unused.
      f01cd8d7
    • A
      Improve System.Speech trimmability (#61566) · 072e8761
      Andrii Kurdiumov 提交于
      by removing obvious warnings
      072e8761
    • H
      Fix LastWriteTime and LastAccessTime of a symlink on Windows and Unix (#52639) · f9d05bd2
      Hamish Arblaster 提交于
      * Implement most of the fix for #38824
      
      Reverts the changes in the seperate PR https://github.com/dotnet/runtime/commit/a617a01195b4dad3cb5f300962ad843b46d4f175 to fix #38824.
      Does not re-enable the test because that relies on #49555, will add a seperate commit to whichever is merged last to enable the SettingUpdatesPropertiesOnSymlink test.
      
      * Most of the code for PR #52639 to fix #38824
      
      • Deal with merge conflicts
      • Add FSOPT_NOFOLLOW for macOS and use it in setattrlist
      • Use AT_SYMLINK_NOFOLLOW with utimensat (note: there doesn't seem to be an equivalent for utimes)
      • Add SettingUpdatesPropertiesOnSymlink test to test if it actually sets it on the symlink itself (to the best that we can anyway ie. write + read the times)
      • Specify FILE_FLAG_OPEN_REPARSE_POINT for CreateFile in FileSystem.Windows.cs (is there any other CreateFile calls that need this?)
      
      * Remove additional FILE_FLAG_OPEN_REPARSE_POINT
      
      I added FILE_FLAG_OPEN_REPARSE_POINT before and it was then added in another PR, this removes the duplicate entry.
      
      * Add missing override keywords
      
      Add missing override keywords for abstract members in the tests.
      
      * Fix access modifiers
      
      Fix access modifiers for tests - were meant to be protected rather than public
      
      * Add more symlink tests, rearrange files
      
      • Move symlink creation api to better spot in non-base files
      • Add IsDirectory property for some of the new tests
      • Change abstract symlink api to CreateSymlink that accepts path and target
      • Create a CreateSymlinkToItem method that creates a symlink to an item that may be relative that uses the new/modified abstract CreateSymlink method
      • Add SettingUpdatesPropertiesCore to avoid code duplication
      • Add tests for the following variants: normal/symlink, target exists/doesn't exist, absolute/relative target
      • Exclude nonexistent symlink target tests on Unix for Directories since they are counted as files
      
      * Fix return type of CreateSymlink in File/GetSetTimes.cs
      
      * Remove browser from new symlink tests as it doesn't support creation of symlinks
      
      Remove browser from new symlink tests as it doesn't support creation of symlinks
      
      * Use lutimes, improve code readability, simplify tests
      
      • Use lutimes when it's available
      • Extract dwFlagsAndAttributes to a variable
      • Use same year for all tests
      • Checking to delete old symlink is unnecessary, so don't
      • Replace var with explicit type
      
      * Change year in test to 2014 to reduce diff
      
      * Rename symlink tests, use 1 core symlink times function, and check that target times don't change
      
      Rename symlink tests, use 1 core symlink times function, and check that target times don't change
      
      * Inline RunSymlinkTestPart 'function'
      
      Inline RunSymlinkTestPart 'function' so that the code can be reordered so the access time test can be valid.
      
      * Share CreateSymlinkToItem call in tests and update comment for clarity
      
      * Update symlink time tests
      
      • Make SettingUpdatesPropertiesOnSymlink a theory
      • Remove special case for Unix due to https://github.com/dotnet/runtime/pull/52639#discussion_r739009259 (will revert if fails)
      • Rename isRelative to targetIsRelative for clarity
      
      * Remove unnecessary Assert.All
      
      * Changes to SettingUpdatesPropertiesOnSymlink test
      
      • Rename item field to link field
      • Don't use if one-liner
      • Use all time functions since only using UTC isn't necessary
      • Remove the now-defunct IsDirectory property since we aren't checking it anymore
      
      * Remove unnecessary fsi.Refresh()
      
      • Remove unnecessary fsi.Refresh() since atime is only updated when reading a file
      
      * Updates to test and pal_time.c
      
      • Remove targetIsRelative cases
      • Multi-line if statement
      • Combine HAVE_LUTIMES and #else conditions to allow more code charing
      
      * Remove trailing space
      f9d05bd2
    • S
      Fix CharInClass reference in regex emitter (#61559) · e85de531
      Stephen Toub 提交于
      We've tried to consistently use global:: whenever referring to core library types in the regex generator emitted code.  I'd missed these two.
      
      (That said, these make the code a lot harder to read, especially in places where we're unable to use extension methods as extensions, so we'll want to revisit this policy.)
      e85de531
    • M
      Exclude the managed code around libproc on iOS/tvOS (#61590) · a53e4897
      Maxim Lipnin 提交于
      Since libproc is a private Apple API, it is not available on iOS/tvOS and should be excluded (see #61265 (comment) and above for more details).  
      This PR excludes $(CommonPath)Interop\OSX\Interop.libproc.cs on the iOS/tvOS as well as makes some methods in Process, ProcessManager, and ProcessThread classes calling that API throw PNSE so that for iOS/tvOS it's possible to re-use the respective *.UnknownUnix.cs parts.  
      a53e4897
    • T
      FileSystem.Unix: improve CopyFile. (#59695) · 9b83294a
      Tom Deseyn 提交于
      * FileSystem.Unix: improve CopyFile.
      
      Like the upcoming version of GNU coreutils 'cp' prefer a copy-on-write clone.
      This shares the physical storage between files, which means no data needs to copied.
      CoW-clones are supported by a number of Linux file systems, like Btrfs, XFS, and overlayfs.
      
      Eliminate a 'stat' call that is always performed for checking if the target is a directory
      by only performing the check when the 'open' syscall reports an error.
      
      Eliminate a 'stat' call for retrieving the file size of the source by passing through
      the length that was retrieved when checking the opened file is not a directory.
      
      Create the destination with file permissions that match the source.
      We still need to fchmod due to umask being applied to the open mode.
      
      When performing a manual copy, limit the allocated buffer for small files.
      And, avoid the last 'read' call by checking when we've copied the expected nr of bytes.
      
      * Don't FICLONE for zero sourceLength
      
      * PR feedback
      
      * When using sendfile, don't loop when source file gets truncated.
      
      * Fall through when FICLONE fails.
      
      * Don't stop CopyFile_ReadWrite until read returns zero.
      
      * Revert all changes to CopyFile_ReadWrite
      
      * Move comment a few lines up.
      
      * Fix unused error.
      9b83294a
    • E
      Use GeneratedDllImport for blittable p/invokes in System.Diagnostics.Process,... · 44387608
      Elinor Fung 提交于
      Use GeneratedDllImport for blittable p/invokes in System.Diagnostics.Process, System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Runtime.InteropServices.RuntimeInformation (#61532)
      
      44387608
    • S
      Use Span.Fill in String(Char, Int32) constructor (#60269) · 31dd7086
      Steve Dunn 提交于
      * Apply suggestions from code review
      Co-authored-by: NAdam Sitnik <adam.sitnik@gmail.com>
      Co-authored-by: NJeremy Koritzinsky <jkoritzinsky@gmail.com>
      31dd7086
    • S
      Remove the "anything + null => null" optimization (#61518) · 3d7e89c1
      SingleAccretion 提交于
      This optimization is only legal if:
      1) "Anything" is a sufficiently small constant itself.
      2) We are in a context where we know the address will in
         fact be used for an indirection.
      
      It is the second point that is problematic - one would
      like to use MorphAddrContext, but it is not suitable
      for this purpose, as an unknown context is counted as
      an indirecting one. Additionally, the value of this
      optimization is rather low. I am guessing it was meant
      to support the legacy nullchecks, before GT_NULLCHECK
      was introduced, and had higher impact then.
      
      So, just remove the optimization and leave the 5 small
      regressions across all of SPMI be.
      3d7e89c1
  3. 15 11月, 2021 3 次提交