1. 11 4月, 2014 1 次提交
    • T
      We stored a CorLib assembly symbol (one that doesn't have any references and... · 9f2c1635
      TomasMatousek 提交于
      We stored a CorLib assembly symbol (one that doesn't have any references and defines System.Object) on ReferenceManager. The instance of the manager is shared across compilations derived via Clone() or WithXxx() unless the metadata reference binding changes.
           If the compilation itself was CorLib we shared its source assembly symbol as a CorLib assembly with the derived compilations, which broke symbol equality.
      
           This change replaces an explicit CorLib reference in the ReferenceManager with null if the CorLib is the compilation being compiled. We have the assembly CorLib symbol in hand when reading the state so we can fill the right symbol in.
           Also refactors VB code in ReferenceManager to exactly match C# implementation.
      
           Resolves #43. (changeset 1227802)
      9f2c1635
  2. 10 4月, 2014 7 次提交
    • M
      Change the VB type inferrer to match C# behavior and infer Integer for both... · ba2cf89c
      MuradT 提交于
      Change the VB type inferrer to match C# behavior and infer Integer for both sides of <<= and >>= operators. The right side in particular is important: it must be an something that widens to an Integer, so that should be the default inferrer behavior.
      This change also contains adds an abstract TypeInferrerTestBase class to avoid duplicating unit test infrastructure across VB/C#, and fixes a small bug in the VB unit test infrastructure to call the node-based invocation of the inferrer. (changeset 1226991)
      ba2cf89c
    • T
      Don't normalize syntax tree path in SyntaxTree.GetDisplayPath if there is none. · a0b5cf2b
      TomasMatousek 提交于
      Also SourceReferenceResolver.NormalizePath should be allowed to return null if the given path can't be normalized. The callers then decide what to do, e.g. use the raw path. (changeset 1226942)
      a0b5cf2b
    • M
      This change makes public means to access workspace and language services. · 7b62af6b
      mattwar 提交于
      FeaturePacks have changed to become HostServices.
      IWorkspaceServiceProvider has become HostWorkspaceServices
      ILanguageServiceProvider has become HostLanguageServices
      
      HostWorkspaceServices can be accessed directly from Workspace.Services.
      HostLanguageServices can be accessed directly from Project.LanguageServices.
      
      Some of the existing workspace and language services have been made public. (changeset 1226729)
      7b62af6b
    • A
      This fixes EncodedStringText to apply the binary file detection heuristic to... · 0c1a7587
      astasyuk 提交于
      This fixes EncodedStringText to apply the binary file detection heuristic to text in any encoding, and also correctly pick Encoding.Default (system locale-dependent) instead of Windows-1252, when encoding is not specified.
      
      Previously, the heuristic only applied if system default codepage was 1252 (default for ENU), thus when a random binary file was passed to command-line compiler as a source code argument on a system with non-ENU locale, a huge number of diagnostics were issued and compiler crashed with an OutOfMemoryException.
      
      This was promptly patched before BUILD by always picking Windows-1252 if encoding was unspecified, thus introducing a breaking change to users on non-ENU systems - if they had non-Unicode sources with extended ASCII characters, their code could fail to compile when transitioning from native compiler to Roslyn.
      
      This fix rolls back this change, and also changes the heuristic to rely on comparing decoded characters to NUL, instead of looking at encoded bytes. (The heuristic is to look for two consecutive NUL characters in decoded character stream, and if those are found, fail the decoding process.) The latter seemed to be applicable to vast majority of possible encodings, with a notable exception of UTF-16 and UTF-32, where two consecutive zero bytes could appear in a legitimate text file. Relying on characters allows us to not depend on the encoding choice.
      
      As a slight downside we're now decoding the entire string (reader.ReadToEnd) before applying the heuristic, though this seems negligible compared to parsing/binding, which takes much more time - we're avoiding that for detected binary files.
      
      On the other hand, we're now relying on trusted StreamReader to decode a string, instead of implementing buffered decoding logic ourselves, as we previously did in DecodeIfNotBinary, and which was prone to buffer boundary errors if we ever used it for multi-byte encodings (though we only called this method for Windows-1252).
       (changeset 1226686)
      0c1a7587
    • R
      abd1fa0f
    • V
    • C
      Initial work to add options pages that allow users to adjust simplification... · f62a6794
      chandera 提交于
      Initial work to add options pages that allow users to adjust simplification options. (changeset 1226565)
      f62a6794
  3. 09 4月, 2014 9 次提交
    • V
      Reverting the changes that introduced asynchronous reading of source files in... · 9689fa85
      VSadov 提交于
      Reverting the changes that introduced asynchronous reading of source files in batch compile scenarios
      
      It appeared that the change did not result in noticeable improvements in IO throughput in scenarios where it matters.
      That is most likely because async reading would be beneficial in a case of reading a small number of large files, while we typically have the opposite - large number of small files.
      
      On the other hand, on not IO-bound scenarios, the change resulted in parsing throughput regressions since it can cause oversubscription of threadpool.
       (changeset 1226132)
      9689fa85
    • J
      Fix two bugs with code generation. · e91c6be4
      jasonmalinowski 提交于
      - when a CodeGenerationMethodSymbol was cloned, it lost it's underlying type (constructor vs. destructor vs. ordinary)
      - when a VB constructor was generated, it wouldn't get the SyntaxAnnotations applied that it should. (changeset 1225875)
      e91c6be4
    • P
      Remove SetLargeAddressAwareBit task from VSL.Imports.targets · 69f9c51c
      Pharring 提交于
      With the Roslyn compiler, the LargeAddressAware bit is already set for VBCSCompiler.exe which is the only project that needs that option. This is different from the native compiler and I'm still tracking down whether it's an intentional change or an accidental one. In any case, the task, as written, didn't work well for incremental builds. (changeset 1225825)
      69f9c51c
    • A
      VB: Use IsIntrinsicType instead of IsIntrinsicValueType in ... · 6972c81b
      AlekseyTs 提交于
      VB: Use IsIntrinsicType instead of IsIntrinsicValueType in  DetermineMostSpecificNarrowingConversion (resolves #31). (changeset 1225726)
      6972c81b
    • H
      fixed ProjectState leak. · 016c9930
      heejaechang 提交于
      made ProjectState not to capture itself when creating version check async lazy. otherwise, there is a possibility of us creating a long list of chain for lazy version calculation. (changeset 1225664)
      016c9930
    • S
      Additional test coverage for BC41000 warning generated but roslyn... · 7eb4037d
      skytribe 提交于
      Additional test coverage for BC41000 warning generated but roslyn intentionally does not.      (changeset 1225515)
      7eb4037d
    • Y
      Bug fix: change 'HasStructuredTrivia' modifier to public on SyntaxToken... · 765c842c
      YingP99 提交于
      Bug fix: change 'HasStructuredTrivia' modifier to public on SyntaxToken (others are already public) (changeset 1225508)
      765c842c
    • J
      AllowMetadataReferenceProperties to be serialized again. · 0c3c71db
      jasonmalinowski 提交于
      This type was already marked [Serializable], but it recently became unserializable when a field of type ImmutableArray was added. We add an ISerializable implementation to work around the non-serializable field. (changeset 1225493)
      0c3c71db
    • A
      C# Overload Resolution: Unify handling of expression and statement lambdas for... · e5105b69
      AlekseyTs 提交于
      C# Overload Resolution: Unify handling of expression and statement lambdas for the purpose of checking for exactly matching expression (resolves #30). (changeset 1225451)
      e5105b69
  4. 08 4月, 2014 9 次提交
  5. 06 4月, 2014 1 次提交
  6. 05 4月, 2014 11 次提交
    • N
    • T
      Consolidates implementation of metadata references in VS: · ff41a35a
      TomasMatousek 提交于
           - Introduces VisualStudioMetadataReference that represents a metadata reference in a project system -- this used to be StandardMetadataReference in MetadataReferenceProvider. When this reference is observed by the workspace a snapshot (compiler PortableExecutableReference) is created with a timestamp. We need to create these snapshots and mark them with a timestamp so that we can get back their past state from past solution snapshots.
      
           - Previous VisualStudioMetadataReferenceProvider (now named VisualStudioMetadataReferenceManager) doesn't derive from MetadataReferenceProvider anymore. MetadataReferenceProvider is meant to support #r directives, not being a base class for all metadata reference factories such as VisualStudioMetadataReferenceProvider. A separate class is used as a MetadataReferenceProvider for compilations.
      
       (changeset 1223460)
      ff41a35a
    • C
      Disable partial semantics for non-compiler projects. · 6eecad42
      cyrusn 提交于
      If a project does not support creating/providing compilations, then it cannot provide a 'frozen partial snapshot' of the compilation with that document contained within.  Just return the entire snapshot instead. (changeset 1223407)
      6eecad42
    • H
      added CSharpServiceTest and VisualBasicServiceTest. · 6d476cc9
      heejaechang 提交于
      for now, it only contains Formatting Tests, but in future, we should split mixed lang tests in service test to each own one. (changeset 1223390)
      6d476cc9
    • B
      Bugfix 889349 · c461abfc
      Basoundr_ms 提交于
      Previously if there was an existing method(constructors too) which has at least one parameter and if there was usage matching the signature of the method except the parameter name, we dont show provide a code action to generate a new method from the usage because the generation of the method would fixed the error at the usage but it introduces a error at definition(duplicate definition)
      
      With the change, we will show code action for new method generation based on the usage because if the user feels that the new defintion is more suitable than the existing definition we should enable them to do the same.
      
      Eg:
      
      class C
      {
          void M()
          {
              M(x: 42);
          }
      
          void M(int y) { }
      }
      
      In the above example applying the code action at the M usage will result in
      
      class C
      {
          void M()
          {
              M(x: 42);
          }
      
          private void M(int x)
          {
              throw new NotImplementedException();
          }
      
          void M(int y) { }
      }
      
      --------------------------------------------------
      
           This error can also be solved by introducing a different codeaction like
      
           1. Consider changing the parameter name to the existing name
           2. Rename the parameter name in the existing method definition
           3. Remove the named Parameter
      
            But these will be separate codeactions which can be implemented later tracked by separate user stories (changeset 1223385)
      c461abfc
    • M
      Fix for bug 529787: [C# and VB] False Unnecessary Cast in collection... · 444b567d
      manishv 提交于
      Fix for bug 529787: [C# and VB] False Unnecessary Cast in collection initializers with overloaded Add method
      
      Use the newly added SemanticModel.GetCollectionInitializerSymbolInfo API to detect if cast removal breaks the semantics of collection initializer expression. (changeset 1223359)
      444b567d
    • N
      Moved FxCop diagnostic analyzer, test, and setup projects into... · 5e666d90
      nslottow 提交于
      Moved FxCop diagnostic analyzer, test, and setup projects into Diagnostics\FxCop folder. Renamed the FxCop analyzer test assembly so as not to be confused with Roslyn.Diagnostics.Analyzers.UnitTests. Added Roslyn diagnostic analyzer projects to Roslyn.sln. (changeset 1223294)
      5e666d90
    • A
      VB Overload Resolution: Adjust amount of shadowing applied before shadowing... · ffc61643
      AlekseyTs 提交于
      VB Overload Resolution: Adjust amount of shadowing applied before shadowing based on inference level. Resolves #32. (changeset 1223276)
      ffc61643
    • L
      Adding CultureContext to Roslyn test utilities to enable compiler tests to be... · 519e25cf
      lasekar 提交于
      Adding CultureContext to Roslyn test utilities to enable compiler tests to be culture agnostic (changeset 1223204)
      519e25cf
    • B
      Bugfix 738826 · ee914c53
      Basoundr_ms 提交于
      VB Parentheses Reducer was missing a case check to see if the expression that is parenthesised is a GetType expression. Added it. (changeset 1223186)
      ee914c53
    • A
      Unskip test for resolved bug. Adjust asserts to reflect remaining issue (not... · e88665a0
      acasey 提交于
      Unskip test for resolved bug.  Adjust asserts to reflect remaining issue (not presently worth fixing). (changeset 1223159)
      e88665a0
  7. 04 4月, 2014 2 次提交
    • N
      Enable test for 528147 (changeset 1222543) · 2f09f368
      nmgafter 提交于
      2f09f368
    • B
      Bugfix 881746 · 3bb97bf5
      Basoundr_ms 提交于
      The change is, when a syntax is simplified into its Alias at Attribute Context (i.e. within Attribute) we make sure that we do not remove the suffix "attribute" from the  new Identifier name because the new identifier is now referencing the Alias.
      
      Having the Identifiers meaning the same with "FooAttribute" and "Foo", where "FooAttribute" inherits System.Attribute, in the Attribute context does not apply for Aliases that has "Attribute" suffix. (changeset 1222441)
      3bb97bf5