1. 09 1月, 2015 37 次提交
    • A
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero... · 505b888f
      AlekseyTs 提交于
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero as IL constant. Fixes #470.
      ***NO_CI***
       (changeset 1393664)
      505b888f
    • T
    • C
    • M
      Added DocumentEditor -- a sub type of SyntaxEditor with document and semantic model accessible. · ee41c869
      mattwar 提交于
      Added SolutionEditor -- enables editting multiple documents.
      
      Added SyntaxEditor extensions -- add base and interface types.
      
      Added SymbolEditor extensions -- set base type for symbol & get reference to base type or interface declaration for a symbol.
      
      Changed SymbolEditor to use DocumentEditor instead of SyntaxEditor in callbacks. (changeset 1393203)
      ee41c869
    • P
      Remove all Obsolete public APIs. · 00868214
      pgavlin 提交于
      ***NO_CI***
       (changeset 1393197)
      00868214
    • T
      Currently we include a method ordinal to the name of a synthesized member... · 74142c4f
      TomasMatousek 提交于
      Currently we include a method ordinal to the name of a synthesized member produced during lowering of the method. When a method is added during EnC in the middle of existing members the ordinal is not enough to avoid name conflicts with the previously emitted synthesized members.
           In order to guarantee uniqueness of the names we now include generation ordinal in synthesized names as well, wherever we use method ordinal. Generation ordinal 0 (regular build) is omitted - the additional number is only added to names of synthesized members created during EnC compilation.
      
           An alternative would be to find the highest existing ordinal and start indexing EnC members from there. Such approach would probably work but including the generation number is much simpler and imposes less constraints on the EnC compilation.
      
           In addition to including the generic ordinal this changeset also fixes a couple of bugs that were previously masked or we haven't had coverage of the scenarios:
           - the EnC changeset calculation was not properly handling additions of synthesized members into existing synthesized classes.
           - SymbolMatcher didn't map local variable types forward correctly for variables of synthesized types.
           - SymbolMatcher didn't handle generic static lambda display classes with generic. Currently we create generic parameters for these classes via alpha renaming of the type parameters of the top-level generic method. VB is constructing fresh generic parameters, which seems a better approach. I'll leave changing this to a follow-up changeset.
      
           As a byproduct of this change we can now enable editing of methods containing dynamic operations. It just works now! Each update of such method creates a new set of dynamic sites. We don't attempt to reuse existing sites. It's little bit wasteful but it also avoids the need of invalidating the call-site caches. (changeset 1393184)
      74142c4f
    • T
      Removes dependency on MDBG from PdbUtilities and cleans up... · bf241425
      TomasMatousek 提交于
      Removes dependency on MDBG from PdbUtilities and cleans up SymUnmanagedReaderExtensions and CustomDebugInfoReader. (changeset 1393106)
      bf241425
    • M
      Fix for bug 612002 · b495c9ac
      mattwar 提交于
      Undos previous fix that changed the compiler to always emitted a generated property name of __result for EndInvoke.
      
      The new change only adds the underscores if there is a name conflict. In this way, we stay metadata compatible with the prior native compiler.
      
      Also added same fix to generated parameters for BeginInvoke, callback and object.
      
      Added test cases. (changeset 1393061)
      b495c9ac
    • T
    • R
      Move Compilation.WithAnalyzers out of Compilation and make it an extension... · bb206458
      RoslynTeam 提交于
      Move Compilation.WithAnalyzers out of Compilation and make it an extension method. (changeset 1392997)
      bb206458
    • M
      Fix for bug 1098490: AnalyzerDriver can deadlock with bad CompilationEventQueue · 066eeae5
      manishv 提交于
      AnalyzerDriver is currently tightly coupled with the sequence and kind of CompilationEvents being produced by the compilation. It requires that the first event on the queue is a compilation started event and the final event is the compilation end event. If either of these events are not produced OR are out of expected order then the driver can deadlock.
      
      This change cleans this up by:
      1) Ignoring the CompilationStartedEvent in the analyzer driver: This event was only triggering initialization of some lazy fields on the driver: compilation, analysis scope, declaration analyzers and event processing task. This code has been refactored into an Initialize method which is triggered in AnalyzerDriver.Create immediately after a new compilation is created with driver's event queue.
      
      2) Clean up ProcessCompilationCompletedAsync: Move the await of syntax tree analyzer tasks and DiagnosticQueue.Complete invocation out of this method into the primary driver task. This method now just invokes all the compilation end actions and doesn't do any post processing.
      
      I have also cleaned up the analyzer test framework a bit. (changeset 1392961)
      066eeae5
    • A
      Eliminate ‘NeedsLocalization’ calls under Compilers. · 743bbba7
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1392938)
      743bbba7
    • M
      Add couple more CodeAnalysis diagnostics for analyzers: · b5577426
      manishv 提交于
      1) Type argument for "TLanguageKindEnum" type param to language specific register methods (RegisterSyntaxNodeAction, RegisterCodeBlockStartAction and RegisterCodeBlockStartAction) must be VB/C# SyntaxKind enum type.
      
      2) Provide LocalizableString arguments for title and description parameters of DiagnosticDescriptor constructor. The rule is disabled by default, but enabled for all our analyzer projects. (changeset 1392911)
      b5577426
    • A
      Ensure that SemanicModel doesn’t dereference null binder. · 09c7d0bd
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1392909)
      09c7d0bd
    • S
      Creating projects for analyzers for CodeAnalysis APIs · d66cab23
      srivatsn 提交于
      These projects (henceforth referred to as CodeAnalysis analyzers) are set of analyzers for the Roslyn APIs. As a start, I'm moving the few metaanalyzers that Manish wrote to this project. We will ship these analyzers with the roslyn nuget packages. So any rules we want to impose on consumers of Roslyn should go here. (changeset 1392712)
      d66cab23
    • A
      Ensure that PENamedTypeSymbol.EnsureNonTypeMemberNamesAreLoaded loads names of all members. · 8fe1b266
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1392700)
      8fe1b266
    • A
      VB: Fix some issues around conversions from a constant expression to a nullable type: · 6473ee0d
      AlekseyTs 提交于
      - Detect numeric overflow for the conversion to the target underlying type during conversion classification.
      - Perform constant folding for the conversion to the target underlying type during lowering
      ***NO_CI***
       (changeset 1392661)
      6473ee0d
    • A
      Make tests passing on a non-English OS, even in presence of corresponding... · 673f18e1
      AlekseyTs 提交于
       Make tests passing on a non-English OS, even in presence of corresponding localized resources. In the process several product issues were fixed like:
           - Localized exception messages incorporated into diagnostics by command line compiler are not obeying /preferreduilang switch.
           - Some strings are loaded from resources at the time when diagnostic object is created. Resources are loaded earlier than they could be. When error message is requested, it might not be localized in accordance with the requested culture.
           - When target culture is not provided, DiagnosticInfo objects used as arguments within another diagnostic object are formatted using InvariantCulture, whereas all other arguments use current culture (as expected). Portions of the message are localized to different languages. (changeset 1392630)
      673f18e1
    • M
    • T
      ImmutableArrayExtensions should be internal - we shouldn't be exposing public... · 58b38b9a
      TomasMatousek 提交于
      ImmutableArrayExtensions should be internal - we shouldn't be exposing public extension methods on collection types. (changeset 1392421)
      58b38b9a
    • T
      83e43491
    • T
      Encapsulate heaps and operations on them in a MetadataHeapsBuilder. Previously... · 42e4a5d1
      TomasMatousek 提交于
      Encapsulate heaps and operations on them in a MetadataHeapsBuilder. Previously pieces of related functionality were scattered all over.
      Improvements in visualizer: for each blob on #Blobs heap display its kind (TypeSpec, MethodSignature, etc.). Calculate and display aggregate blob sizes per kind. (changeset 1392195)
      42e4a5d1
    • S
      Adding a TestExtensionManager class in the VisualStudioTestSetup project that... · 2330f690
      shyamn 提交于
      Adding a TestExtensionManager class in the VisualStudioTestSetup project that will cause any crashes encountered in the light bulb when running VS integration tests to crash VS within an exception filter as opposed to later once the exception has already been caught.
      
      I am adding this to get more actionable dumps to debug the issue reported in Bug 1098600... (changeset 1391946)
      2330f690
    • J
      Fix InvalidCastException that might be encountered with loading MSBuild project files. · 5703ae72
      jasonmalinowski 提交于
      The problem was an errant cast assumed the metadata would be a string[]. The clean fix is to use the appropriate extension method to deal with the single/multiple case that we get from the MEF library. (changeset 1391813)
      5703ae72
    • B
    • K
    • M
      Turn off the recently added Roslyn diagnostics for validating implementation... · e750a725
      manishv 提交于
      Turn off the recently added Roslyn diagnostics for validating implementation of anlayzers until I clean them up for Roslyn.sln (changeset 1391678)
      e750a725
    • T
      Static lambdas in generic methods are emitted on per-method display class.... · 9c7ab597
      TomasMatousek 提交于
      Static lambdas in generic methods are emitted on per-method display class. Include method ordinal into its name to make it unique.
      
           The previous change to synthesized name numbering introduced a regression - if two generic methods of the same arity contained static lambdas the resulting assembly had duplicate type names. This change addresses that case.
       (changeset 1391470)
      9c7ab597
    • K
    • M
      Add few more Roslyn diagnostic rules for analyzers: · f2f1e52a
      manishv 提交于
      1) Analyzer has an expensive compilation end action: The compilation end actions registered on CompilationStartAnalysisContext can be executed only after all other actions registered on it have been executed on the entire compilation. This can hurt the typing performance when the analyzer is executed in the Visual Studio IDE. If the analysis done within your compilation end action is independent of analyses done in other actions registered on CompilationStartAnalysisContext, then consider registering this end action on AnalysisContext in Initialize method instead of registering it here. This should improve the IDE performance for your analyzer.
      
      2) Recommend adding language support to diagnostic analyzer: If the analyzer supports just one of C#/VB languages, but the analyzer assembly doesn't reference either C# or VB CodeAnalysis assemblies, then the analyzer is pretty likely a language-agnostic analyzer and can support both languages. Consider either removing the argument to DiagnosticAnalyzerAttribute or adding a new DiagnosticAnalyzerAttribute for 'XXX' language support.
      
      3) ReportDiagnostic invoked with an unsupported DiagnosticDescriptor: Only supported descriptors returned from DiagnosticAnalyzer.SupportedDiagnostics should be used for diagnostics reported by ReportDiagnostic. This is a common mistake when adding new rules to an existing analyzer, the diagnostic author might forget to update SupportedDiagnostics. (changeset 1391218)
      f2f1e52a
    • T
      Implements a new approach to generating unique synthesized member names (see... · 94711411
      TomasMatousek 提交于
      Implements a new approach to generating unique synthesized member names (see also the attached email).
      
           1) Assigns each member a "member ordinal" - the index in the members array of the containing type. The ordinal is propagated thru lowering rewriters which uses it to make generated names unique.
           2) We no longer calculate "overload ordinal" for names of state machine types, we use the member ordinal of the async/iterator method instead.
           3) Removes GenerateTempNumber from TypeCompiationState. Combination of method ordinal and other indices is used to make generated names unique:
           - Display classes use ordinal of the method containing the lambda and closure scope ordinal (unique within a method). Static display class is shared across all non-generic methods of a containing class and thus doesn't need a unique number in name (it;'s simple named "c<>").
           - Lambda methods include containing method ordinal (unless emitted to a display class whose name already includes it) and lambda ordinal (unique within a method).
           - The same for fields caching lambdas.
           - Dynamic site containers - no longer include method name in the type name, instead method ordinal is used.
      
           4) Expression compiler - rename generated type to "<>x" to avoid confusion with "<>c" static display class.
           5) Avoid replacing "." with "_" in member names, other than type names. While displaying stack frames the EE extracts method name from synthesized lambdas method names and displays it. Thus we were displaying "I_F" instead of "I.F" for explicitly implemented methods.
            In type names replace "." with "-". Replacing with "_" lead to duplicate type names in emitted assembly (2 iterator methods with names "I_F" and "I.F" - explicitly implemented iface method). (changeset 1390962)
      94711411
    • M
      Add Roslyn diagnostic analyzers for validating implementation of diagnostic... · bbb922cd
      manishv 提交于
      Add Roslyn diagnostic analyzers for validating implementation of diagnostic analyzers (meta-analyzers)
      
      1) MissingDiagnosticAnalyzerAttributeRule: Validate that non-abstract sub-type of DiagnosticAnalyzer has DiagnosticAnalyzerAttribute applied to it.
      
      2) MissingKindArgumentRule: Ensure that at least one symbol kind/syntax kind argument is provided to RegisterSymbolAction/RegisterSyntaxNodeAction respectively.
      
      3) UnsupportedSymbolKindArgumentRule: Ensure that only supported symbol kinds are registered with symbol analyzer actions.
      
      4) ApplyDiagnosticAnalyzerAttributeFix: CodeFixProvider for Rule (1) to generate DiagnosticAnalyzer attribute(s). (changeset 1390936)
      bbb922cd
    • D
      [de minimis] Core IDE Support for VB string interpolation · 3fac3705
      dustincampbell 提交于
      The vast majority of this came from ADGreen (thanks Anthony!), which in turn had a great deal ported from the work I'd done in C#.  At this point, I'm not sure *who* wrote this code. It's shelvesets all the way down.
      
      * Automatic brace completion
      * Formatting
      * Completion list
      * Brace matching
      * Classification (changeset 1390884)
      3fac3705
    • M
      Upgrade to newer nuget packages for toolset compilers and diagnostics. · f5a4e033
      manishv 提交于
      Also fixes bug 1097058 by removing the suppressions for now fixed RS0013. (changeset 1390773)
      f5a4e033
    • R
      ba123ce3
    • A
      Disable a missed keepalive test and mark it with the same workitem to... · 4c0d29f4
      angocke 提交于
      Disable a missed keepalive test and mark it with the same workitem to investigate keepalive test reliability (CS 1095079). (changeset 1390720)
      4c0d29f4
    • R
      Move the internal folder structure from Open/* to Open/src/*. · d54b32f7
      RoslynTeam 提交于
      This matches the folder mapping of the git repository and makes it easier
      to do mapping to Codeplex/Git. (changeset 1390665)
      d54b32f7
  2. 07 1月, 2015 3 次提交