1. 04 6月, 2014 4 次提交
    • V
      Fix bug 529880: fix incorrect parsing (leading to a crash) of FULLWIDTH COLON... · 634e7473
      vladres 提交于
      Fix bug 529880: fix incorrect parsing (leading to a crash) of FULLWIDTH COLON (U+FF1A) when it appears immediately after an XML name in VB. Now it is always parsed as a statement separator in this context (if possible), that agrees with the native VB compiler. Also adds some tests for the REM keyword in XML name context. (changeset 1269793)
      634e7473
    • H
      use concurrent dictionary rather than lock + regular dictionary when objectbinder is shared · 41e4f2fa
      heejaechang 提交于
      I did some experiment and it looks like using concurrent dictionary makes write about 100% faster and read about 50% faster in heavily concurrent sencario.
      
      since RecordingObjectBinder is used for syntax node serialization and deserialization which can be quite heavily concurrent, this should help us to get those tree from tree storage faster.
      
       (changeset 1269787)
      41e4f2fa
    • B
      Bugfix 956667 CR · 9e2105cf
      Basoundr_ms 提交于
      Simplification to Predefined Type keyword within Member Access Expression was missing a Symbol check in addition to the Type Check. Fixed in both VB and C# (changeset 1269571)
      9e2105cf
    • B
      Bugfix · 9b09d015
      Basoundr_ms 提交于
      956667 : Simplification to Predefined Type keyword within Member Access Expression was missing a Symbol check in addition to the Type Check. Fixed in both VB and C#
      
      953535 : Introduced a new formatting rule to handle spacing within the Conditional Expression (changeset 1269369)
      9b09d015
  2. 03 6月, 2014 1 次提交
  3. 31 5月, 2014 6 次提交
    • T
      Do not crash when reporting SQM data from the compiler. · bd71c33e
      tmeschter 提交于
      When collecting SQM data, the compilers try to include the set of diagnostic codes that the user has supplied options for. For example, warnings that have been suppressed, warnings that should be treated as errors, etc. We only intend to collect data for compiler diagnostics, and the code assumes that all diagnostic IDs take the form "CS1009" or "BC1009".
      
      Now that we support rule set files for third-party diagnostics this assumption is no longer correct. If we're collecting SQM data and a rule set includes a setting for a diagnostic with the ID "MyDiagnostic" (for example), we'll try to parse "Diagnostic" as a uint and crash the compiler.
      
      The fix is to filter out everything that doesn't match the expected format. (changeset 1267569)
      bd71c33e
    • B
      Bug Fix 530727: Recommend Namespace, Module keyword after type declaration. · 642103f7
      BalajiKris 提交于
      Example:
      Namespace N1
      Class C
      End Class
      $$
      End Namespace
      
      Typing at $$ makes the syntax tree incomplete and the token at $$ gets attached to the EndBlock. However, the IDE needs to think of this as being attached to the surrounding namespace declaration to be able to recommend keywords that apply here.
      
      This change handles such error cases to provide better keyword recommendation.
      
      More examples:
      
      Namespace N1
      End Namespace
      $$
      
      Module M1
      End Module
      $$
      
      End Class
      $$
      
      Namespace N1
      End Class
      $$
      End Namespace
      
      and so on. Added tests for all such cases. (changeset 1267530)
      642103f7
    • C
      Remove unused field (changeset 1267491) · e8006818
      ChuckStoner 提交于
      e8006818
    • A
    • M
      Add support for a custom PreviewOperation CodeActionOperation: This enables... · e4449221
      manishv 提交于
      Add support for a custom PreviewOperation CodeActionOperation: This enables clients to display custom WPF controls in the preview dialog. This preview control might have custom description, hyperlinks and other custom controls appropriate for the code action preview. (changeset 1267319)
      e4449221
    • T
      The current implementation of MultiByteEncoding is not portable. This change... · cabccd43
      TomasMatousek 提交于
      The current implementation of MultiByteEncoding is not portable. This change replaces it with a simpler string serialization technique.
      
      The problem is with GetBytes(char*, int, byte*, int) -- we needed to override this method in order to avoid buffer allocation. But the base method is currently not exposed in portable profile.
      We don't actually need to define an ecnoding to serialize strings. We can serialize strings to byte array manually and then write the bytes direaction to the strream.
      
      Taking it one step furtehr we can also avoid using a custom string serialization format as well. Instead we chack if the string being serialized is UTF8-encodable. We already have a helper in MetadataHelpers that answers that question. If it is we use UTF8 encoding, otherwise we use UTF16 encoding. Invalid Unicode characters are rare so we don't need to optimize the latter. (changeset 1267243)
      cabccd43
  4. 29 5月, 2014 12 次提交
  5. 24 5月, 2014 3 次提交
  6. 23 5月, 2014 14 次提交
    • T
      Ignore rule set <Include> elements that we don't know how to resolve. · 0de4871e
      tmeschter 提交于
      The compilers cannot currently resolve the same range of <Include> elements as FxCop. Consider the following:
      
        <Include Path="MinimumRecommendedRules.ruleset" Action="Default" />
      
      FxCop knows to go look for MinimumRecommendedRules.ruleset among the rule sets installed with VS, as well as in any user-defined locations. Roslyn lacks this ability, and so some projects that previously built will now fail with an error about the file not being found.
      
      For the moment, just work around the issue by ignoring any included files that can't be found. (changeset 1261868)
      0de4871e
    • S
      Disallow ComAliasNameAttribute from getting emitted on parameters in cases... · 069419c1
      shyamn 提交于
      Disallow ComAliasNameAttribute from getting emitted on parameters in cases where user invokes implement interface refactoring to implement a COM interface. (changeset 1261481)
      069419c1
    • K
      Adding missing null check. (changeset 1261424) · f35e0dc4
      kayleh 提交于
      f35e0dc4
    • A
      C#: Adjust implementation of Primary Constructors to match current language design: · d45c6cdf
      AlekseyTs 提交于
      - Disallow field modifiers and field attributes on primary constructor parameters.
      - Adjust scope of primary constructor parameters.
      - Allow referencing non-ref/non-out primary constructor parameters in a lambda.
      - Report appropriate diagnostics when a primary parameter is shadowed in a nested scope.
       (changeset 1261399)
      d45c6cdf
    • W
      Adjust Sequence Points for C# Using to align with Break Points · 5a846eab
      wochae 提交于
      The sequence point used to be on the "using" keyword while the break point spans around both "using" keyword and the expression. Here, we adjust sequence points to be aligned with break points. Also, we update unittests in a way that the markup can be used to identify a specific span which is verified. (changeset 1261135)
      5a846eab
    • P
      eb5d89be
    • P
    • C
      Preselect types and members based on the <completionlsit> documentation... · 027f4515
      chandera 提交于
      Preselect types and members based on the <completionlsit> documentation comment tag. (changeset 1261004)
      027f4515
    • T
      Add zero-th entries to heaps even for delta metadata to avoid nil... · b93ab842
      TomasMatousek 提交于
      Add zero-th entries to heaps even for delta metadata to avoid nil generation-relative handles, which are technically ok but confusing. (changeset 1260989)
      b93ab842
    • T
      Update the XML schema for rule set files to catch more duplicate rules. · fa2e9520
      tmeschter 提交于
           Before reading the contents of a .ruleset file, we validate it against a schema. This catches common problems, such as duplicate rule definitions.
      
           The issue here is that we will currently catch this:
      
           <Rules ... >
             <Rule Id="CA1011" Action="Warn" />
             <Rule Id="CA1011" Action="Error" />
           </Rules>
      
           but not this:
      
           <Rules ... >
             <Rule Id="CA1011" Action="Warn" />
           </Rules>
           <Rules ... >
             <Rule Id="CA1011" Action="Error" />
           </Rules>
      
           That is, the schema only enforces that a Rule is unique within a Rules element, not that it is unique across the whole ruleset. This causes a later compiler crash when we attempt to set the action for rule CA1011 and find that it has already been set.
      
           The fix here is to update the schema file to enforce uniqueness across the file. (changeset 1260974)
      fa2e9520
    • B
      Story 942568 · 9e4c51d9
      Basoundr_ms 提交于
      Introduce option to prefer intrinsic type keyword over expanded type. The default option is to prefer the intrinsic keyword
      
           Eg:
           1. With the option enabled[default]
           class Program
           {
               private int _member;
               static void M(int argument)
               {
                   int local;
               }
           }
      
           2. With option disabled
           class Program
           {
               private System.Int32 _member;
               static void M(System.Int32 argument)
               {
                   System.Int32 local;
               }
           } (changeset 1260681)
      9e4c51d9
    • T
      Stores Encoding on SourceText so that we can always calculate checksum of the... · 97862d24
      TomasMatousek 提交于
      Stores Encoding on SourceText so that we can always calculate checksum of the underlying binary data, even if the SourceText wasn’t created from a Stream.
      
      Adds WithRootAndOptions and WithFilePath methods to SyntaxTree and implements them for all subclasses. I decided to merge WithRoot and WithOptions to a single method WithRootAndOptions since setting one without the other doesn't make much sense (the options should correspond to the root node).
      
      Propagates the Encoding throughout workspaces and services.
      Refactors recoverable syntax trees so that they can implement With* methods.
      
      Allow encoding on SourceText to be unspecified (null) and report an emit diagnostic when attempting to emit debug information for a syntax tree that is backed by encoding-less source text. If user creates a syntax tree from a string they previously read from a file and then try to emit debuggable compilation with such tree the original encoding of the file might not match the default UTF8 (they might different by presence of BOM, which is quite subtle). To avoid confusion we don't set UTF8 encoding by default. Instead we report the diagnostic and the user needs to explicitly provide an encoding to the syntax tree factory method.
      
      Avoid leaking DecoderFallbackException out of EncodedStringText.Create. Throw InvalidDataException instead to reduce the amount of exceptions that the caller needs to deal with.
      
      Also moves HasSameText extension method from Services to SourceText and optimizes the comparison for the case we the SHA1 checksums are available.
       (changeset 1260412)
      97862d24
    • A
    • C
      #872954: Missing error "CS0523: Struct member '...' causes a cycle in the... · b5f771c7
      ChuckStoner 提交于
      #872954: Missing error "CS0523: Struct member '...' causes a cycle in the struct layout" for nested enum (changeset 1259966)
      b5f771c7