1. 31 10月, 2020 1 次提交
  2. 30 10月, 2020 3 次提交
  3. 28 10月, 2020 6 次提交
    • A
      Add an enforcement for a layering separation between Cci instances used for... · bf6ad0f9
      AlekseyTs 提交于
      Add an enforcement for a layering separation between Cci instances used for metadata emit and compiler symbols. (#48838)
      
      We implement Cci interfaces directly on compiler symbols, but primary motivation for this is performance, i.e. reduction of allocations. Support for identity conversion between symbols and Cci instances throughout the code base was not part of the design. Instead the intent was that symbols go through an explicit “translation” process, which is responsible for deciding if it is appropriate to return the symbol itself, or an appropriate wrapper should be created. Unfortunately, there was no mechanism of enforcement for the intent and it was violated on multiple occasions. Even, when identity conversion outside of “translation” process was appropriate, those places in code were hard to spot because they all looked like a regular explicit/implicit conversions or type checks, which were always succeeding at runtime because instances indeed were identity convertible. Another issue caused by the same optimization was around comparing Cci instances in various components. Majority of comparisons were simply relying on default object equality of Cci instances, which effectively often was default symbol equality, or a reference equality, when a wrapper was created by “translation” process. However, the default symbol equality wasn’t specifically designed to be appropriate for all those components. In fact, different components have different requirements for equality implementation.
      
      In an attempt to address the issues outlined above, the following changes are made:
      1) Symbols no longer implement Cci interfaces directly for DEBUG configuration (at the moment only for C# symbols, VB will follow). This prevents ability to implicitly/explicitly use identity conversions and type checks.
      2) A helper APIs are added that allow explicit transition between symbols and Cci instances, that works equally well for all build configurations. They allow relatively easy to spot places where a transition between layers occurs, even when identity of objects doesn’t change in the process.
      3) Use of default equality for Cci entities is disallowed. That is achieved by throwing from Equals/GetHashCode overrides. All components relying on comparison between Cci entities should explicitly use appropriate comparers.
      
      Related to #45758.
      bf6ad0f9
    • S
      Normalize API files for sort order · 2f58a32d
      Sam Harwell 提交于
      2f58a32d
    • S
      Update to roslyn-analyzers 3.3.1-beta1.20527.2 · 1bc8c97e
      Sam Harwell 提交于
      1bc8c97e
    • S
      Remove StringSlice in favor of ReadOnlyMemory<char> · 7e6b174f
      Sam Harwell 提交于
      7e6b174f
    • T
      Test layering (#48927) · fbf1583e
      Tomáš Matoušek 提交于
      * Change Microsoft.CodeAnalysis.Test.Utilities solution folder
      
      * Remove workaround for fixed NuGet bug.
      
      * Remove unnecessary project references
      
      * Rename Roslyn.Services.UnitTests.Utilities to Microsoft.CodeAnalysis.Workspaces.Test.Utilities
      
      * Remove unneccessary project references
      
      * Remove unnecessary references
      
      * Rename Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities to Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2
      
      * Rename Roslyn.Services.Test.Utilities to Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities
      
      * Fixes
      
      * Update Compilers.sln
      fbf1583e
    • C
  4. 27 10月, 2020 6 次提交
  5. 26 10月, 2020 1 次提交
  6. 25 10月, 2020 1 次提交
  7. 24 10月, 2020 7 次提交
  8. 23 10月, 2020 3 次提交
  9. 22 10月, 2020 1 次提交
  10. 20 10月, 2020 7 次提交
  11. 17 10月, 2020 4 次提交