1. 12 4月, 2014 6 次提交
    • C
      Added BoundExpression.SuppressVirtualCalls and... · 3ecaf4f7
      ChuckStoner 提交于
      Added BoundExpression.SuppressVirtualCalls and BoundConversion.IsBaseConversion properties and changed Emit to use SuppressVirtualCalls (changeset 1229384)
      3ecaf4f7
    • H
      dd9d88ef
    • N
      Added the first diagnostic analyzer (+tests) which will eventually analyze... · 669ad295
      nslottow 提交于
      Added the first diagnostic analyzer (+tests) which will eventually analyze Roslyn.sln. It produces the following diagnostics:
      RS0001: Use SpecializedCollections.EmptyEnumerable<T>() instead of allocating an array of length 0 or using System.Linq.Enumerable.Empty<T>()
      RS0002: Use SpecializedCollections.SingletonEnumerable<T>() instead of allocating an array of length 1.
      
      In order to get RS0002 completely correct, analyzers need to be able to do data flow analysis, so there are a few skipped tests for now.
      
      In the process of implementing the unit tests, I also pulled the diagnostic analyzer test base into a separate project, DiagnosticsTestUtilities. I updated the analyzer test base to provide output formatted to be immediately usable in test cases, similar to the compiler diagnostics tests. (changeset 1229264)
      669ad295
    • M
      The change moves the code fix and code refactoring interfaces (and support... · 52bf7ce4
      mattwar 提交于
      The change moves the code fix and code refactoring interfaces (and support classes) to workspace layer.
       (changeset 1229162)
      52bf7ce4
    • H
      fixed formatting test failures. · 5a589af8
      heejaechang 提交于
      while moving down tests from another layer, some of tests arguements got disordered. (changeset 1228966)
      5a589af8
    • S
      Changes to DiagnosticService to understand analyzer names. · 2719ec1e
      srivatsn 提交于
      There are three changes in this changeset:
      
      - The ruleset editor needs to group diagnostics based on the analyzer reference that it came from. The call to GetAllDiagnosticDescriptors now returns a map from analyzerName->descriptors in that reference. When we crack open analyzer references, we were simply storing a flat list of all the analyzers. I'm changing it to store the analyzer names as well.
      
      While adding tests for these I found two other issues:
      - GetDiagnosticState was computing projectSpecificProviderId by substracting the sharedId but the ProjectAndStates was also doing it resulting in double decrement. Fixing by removing it in one place.
      - A call to DiagnosticService.GetDiagnostics doesn't force compute diagnostics if an analyzer has never run before. Fixing by computing based on flag.
       (changeset 1228917)
      2719ec1e
  2. 11 4月, 2014 4 次提交
  3. 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
  4. 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
  5. 08 4月, 2014 9 次提交
  6. 06 4月, 2014 1 次提交
  7. 05 4月, 2014 4 次提交
    • 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