List of breaking changes in Roslyn

前端 未结 1 671
梦如初夏
梦如初夏 2021-01-06 12:43

After switching to Visual Studio 2015, we have noticed that some changes made to how lambdas are compiled to MSIL in Roslyn (described in this thread and on GitHub) introduc

相关标签:
1条回答
  • 2021-01-06 13:10

    (Update)

    Thanks to @NealGafter for providing the link. The list of breaking changes can currently be found here:

    • Roslyn Github issue 7278: List of breaking changes in Roslyn

    It seems that some documentation is supposed to be here: Roslyn Compiler Specification (roslyn/docs/compilers on GitHub). According to the description:

    The compiler specification details the supported (and semi-supported) surface area of the Roslyn VB and C# compilers. This includes

    1. Command-line switches and their meaning
    2. Breaking changes from previous versions of the compilers
    3. Compiler behaviors that are (intentionally) contrary to the specification
    4. Compiler features not described by the language specification
      • COM-specific and other Microsoft-specific features
      • "Well-known" attributes that affect compiler behavior
      • The "ruleset" file syntax and semantics
    5. Features included for interoperability between C# and VB, for example
      • Named Indexers use from C#
    6. Places where the compiler behavior diverges from the language specification
    7. Limitations (e.g. identifier length)
    8. History of language changes per version

    The document describing changes to CodeGen regarding lambdas (because this was my initial issue) is at roslyn/docs/compilers/CSharp/CodeGen Differences:

    Non-lifting Lambda expressions are now implemented as instance methods on singleton display classes. Since the entry point to the delegate is the instance "Invoke" method, it is cheaper at runtime to dispatch delegate invocations to the underlying implementing method if such method is also an instance method with exactly same formal signature as "Invoke".

    0 讨论(0)
提交回复
热议问题