1. 06 10月, 2014 5 次提交
  2. 05 10月, 2014 3 次提交
  3. 04 10月, 2014 16 次提交
    • H
      wait up to 5 seconds on VS shutdown to give grace period to shutdown solution... · cc87ac0f
      heejaechang 提交于
      wait up to 5 seconds on VS shutdown to give grace period to shutdown solution cralwer. otherwise, some async method of solution cralwer might in the middle of running even after shutdown process started. (changeset 1348118)
      cc87ac0f
    • K
      Rollback change that added a reference to the Compilation on... · 610c328b
      Kevin_H 提交于
      Rollback change that added a reference to the Compilation on CompilationTestData.  I misunderstood the root cause of the issue that caused a test to AV when visualizing IL. (changeset 1348099)
      610c328b
    • T
      The synthesized variable used for storing the value of Select Case should be... · a1c4f361
      TomasMatousek 提交于
      The synthesized variable used for storing the value of Select Case should be long-lived. (changeset 1348097)
      a1c4f361
    • D
      Bugfixes 991528 and 1038018 Respecting encoding settings · 400ce23a
      dpoeschl 提交于
      Bugfix 991528 "[CodePlex] Persisting Documents with MSBuildWorkspace.TryApplyChanges doesn't respect existing encoding"
      
      Pass the CodePage MSBuild property to our MSBuildWorkspace instead of defaulting to the system default encoding. If the CodePage is 0 or missing, we default to UTF8.
      
      Bugfix 1038018 "Inline rename causes unrelated edits in files with unicode characters"
      
      The TextBufferTextFactory now prefers encodings in the following order:
           - UTF8/Unicode/BigEndianUnicode if the byte order mark is present
           - The specified default codepage/encoding in the project file
           - UTF8 without a byte order mark
           - The system default encoding (changeset 1348078)
      400ce23a
    • T
      EnC: Local variable mapping rewrite. · 916b9efa
      TomasMatousek 提交于
      Current approach and issues
      
           When emitting method body of a method updated during EnC the compiler needs to assign local variables the same slots they had before the edit, so that state stored in those locals gets preserved.
           To implement this slot mapping we used to encode information into synthesized variable names that identified the syntax node that produced the variable and ultimately allowed us to calculate the slot mapping.
           For user variables we identified the slot by name. In both cases we relied on an assumption that the compiler assigns slots in syntax order. This assumption is false in some cases. We could make it true but the requirement would be fragile and hard to enforce when new features are implemented in the compiler since the entire lowering pipeline would need to preserve the assumption.
      
           New approach
           In the new approach we calculate a "syntax offset" for each user-defined and long-lived synthesized variable. Every such variable symbol has to be associated with a syntax node (its declarator). In usual cases this is the textual distance of the declarator from the start of the method body. It gets a bit complicated when the containing method body is not contiguous (constructors). If the variable is in the body of the constructor the definition of syntax offset is the same. If the variable is defined in a constructor  initializer or in a member initializer (this is only possible when declaration expressions or closures in primary constructors are involved) then the distance is a negative sum of the widths of all the initializers that succeed the declarator of the variable in the emitted constructor body plus the relative offset of the declarator from the start of the containing initializer.
      
           If a single node is a declarator for multiple variables of the same synthesized kind (it can only happen for synthesized variables) we calculate additional number "ordinal" for such variable. We assign the ordinals to the synthesized variables with the same kind and syntax offset in the order as they appear in the lowered bound tree. It is important that a valid EnC edit can't change the ordinal of a synthesized variable. If it could it would need to be assigned a different kind or associated with a different declarator node.
      
           To support EnC of async method we will assign another number "subordinal" to certain synthesized locals (produced by spilling by-ref variables) to simplify the mapping. Assigning of such number is not yet implemented in this change.
      
           Together (syntax offset, ordinal, subordinal) form a LocalDebugId of a variable. Since this id needs to be stored in PDB for both user-defined and long-lived synthesized variables we can’t encode it in the name of the variable (the names of user-defined variables have to be their user specified names). Therefore this change introduces a new custom debug info record that is associated with a method. The record encodes the kind and id for each local slot of the method.
      
           As a consequence we no longer emit names for synthesized long-lived variables (“CS$...”) unless it’s necessary for backward comp with Dev12 EE (only display class local names need to be emitted for this reason). (changeset 1348066)
      916b9efa
    • R
      Add a Culture property to AnalyzerOptions so that analyzers can localize... · b1691bfa
      RoslynTeam 提交于
      Add a Culture property to AnalyzerOptions so that analyzers can localize diagnostics. (changeset 1347954)
      b1691bfa
    • M
    • V
      Fix bug 1040171: ETA crashes if labeled statement is used as an embedded... · e70cbbdb
      vladres 提交于
      Fix bug 1040171: ETA crashes if labeled statement is used as an embedded statement. Also simplifies some conditions using null-propagating operator. (changeset 1347929)
      e70cbbdb
    • H
      removed diagnostic code I had put into workspace to figure out MEF issues. it... · af9763aa
      heejaechang 提交于
      removed diagnostic code I had put into workspace to figure out MEF issues. it is no longer needed. no fix yet though. (changeset 1347829)
      af9763aa
    • B
      Bugfix 1036954 CR Comments (changeset 1347775) · 68e7654f
      Basoundr_ms 提交于
      68e7654f
    • K
      Add a reference in CompilationTestData to hold on to the Compilation that was... · d8a4bfb8
      Kevin_H 提交于
      Add a reference in CompilationTestData to hold on to the Compilation that was used to initialize it.  The IL visualizer requires Symbols of the Compilation to still be alive when visualizing tokens.
      
      Most of the time, we hold a reference to the compilation in the test method, so the lifetime of the Symbols would be long enough for all test verification to occur.  However, in some tests, the Compilation is created in a helper and then thrown away as soon as the PE image is emitted.  Verification steps later in the test method could result in AVs if a GC occurs at the wrong time. (changeset 1347747)
      d8a4bfb8
    • J
    • B
      Bugfix 1036954 : Compiler only expects IOException and BadImageFormatException... · d20c2155
      Basoundr_ms 提交于
      Bugfix 1036954 : Compiler only expects IOException and BadImageFormatException coming out of PortableExecutableReference.GetMetadata.
      
      Any other exception (like UnauthorizedAccessException) needs to be wrapped into IOException, unless it already derives from IOException.
           VisualStudioMetadataReferenceManager.GetStorageInfoFromTemporaryStorage directly calls File.Open which may throw all sorts of exceptions.
      
      The fix is to call FileUtilities.OpenStream which wraps the exceptions properly
      
      Since this is behavior expected any where in the product, the APIs Open, Create have now been wrapped with the helpers to generate the IOException instead of some random exception. (changeset 1347659)
      d20c2155
    • A
      C#: Changing BaseListSyntax to contain a list of BaseTypeSyntax nodes rather... · fd4cf5dc
      AlekseyTs 提交于
      C#: Changing BaseListSyntax to contain a list of BaseTypeSyntax nodes rather than a list of TypeSyntax nodes. (changeset 1347630)
      fd4cf5dc
    • R
      I am adding telemetry to Roslyn to collect information regarding analyzers... · ec281063
      RoslynTeam 提交于
       I am adding telemetry to Roslyn to collect information regarding analyzers which crash. This is to get answers for questions like
           - What are the top 10 analyzers which crash the most often in a VS Session?
           - What exceptions do they crash with?
           - What kind (symbol, syntaxtree) of analyzers crash often?
      
           DiagnosticAnalyzerDriver.cs - Log the analyzer and the exception details when there is a crash.
           DiagnosticAnalyzerLogger.cs - Logic to aggregate the analyzers crash details and post the summary as telemetry event.
           SolutionCrawlerLogger.cs - Log the analyzer crash summary during shutdown.
           HashAlgorithms.cs - Some style cop changes. (changeset 1347620)
      ec281063
    • M
      Fix for bug 685183: Eliminate usages of SemanticModel.ResolveOverloads · 2b627eee
      manishv 提交于
      This change replaces the uses of this API with use of speculative semantic model to determine if invoking a different constructor (given type or its base type), possibly with a subset of arguments, binds to an accesible constructor.
      Additionally, I have removed this public API from SemanticModel.
      
      Note: There are still language specific internal implementations of this API. These seem to be only used by tests, but some tests use them as helpers to test actual overload resolution functionality. I'll open a separate bug on compiler team to clean this up post-preview. (changeset 1347617)
      2b627eee
  4. 03 10月, 2014 9 次提交
    • K
      Update EE to handle EnC updates (add/remove locals) by flowing the method... · ac2c8dd4
      Kevin_H 提交于
      Update EE to handle EnC updates (add/remove locals) by flowing the method version through to ISymUnmanagedReader.GetMethodByVersion.
      
      (fixes #1017468 & #1030053)
      ***NO_CI***
       (changeset 1347348)
      ac2c8dd4
    • R
      This change enables TypeScript to participate in the settings infrastructure... · 78834998
      RoslynTeam 提交于
      This change enables TypeScript to participate in the settings infrastructure in Roslyn, the immediate requirement is to enabe the ability to enable/disable the Navigation bar, but in the future this will be used for more/other features. (Brace macthing comes to mind).
      
      To minimize the impact I made the following changes:
           - Add an IVT to the ServicesVisualStudioImpl project, this makes the AbstractLanguageSettingsSerializer visible to TypeScript
           - Move the internal class ExportLanguageSpecificOptionSerializerAttribute and ExportOptionSerializerAttribute  to the ServicesVisualStudio project.
           - Fix up namespaces and references to those namespaces
      ***NO_CI***
       (changeset 1347128)
      78834998
    • V
      Implements a spec refinement to how autoprops behave in constructors and initializers. (VB) · 5e38a533
      VSadov 提交于
           For accesses to an autoprop in a corresponding [static|instance] constructor or initializer -
      
           (a) It should bind to the property, but the property should be treated as a readable/writable even if it is a readonly autoprop.
           (b) The definite assignment behavior should be as if directly accessing the backing field. (not observable in VB)
           (c) It should code gen to the property accessor (if one exists) or a field access (if not).
      
           The most observable outcome of all this is that it is possible to assign a readonly autoprop in the constructor.
      
           The following code is now valid and does what you think it does:
      
      Module Program
          Structure c1
              Public readonly Property p1 As Integer
              Public readonly Property p2 As Integer
              Public Sub New()
                  p1 = 42
                  p2 = p1
              End Sub
          End Structure
      
          Sub Main(args As String())
              Dim c As New c1
              System.Console.WriteLine(c.p2)
          End Sub
      End Module
      
      .
       (changeset 1347106)
      5e38a533
    • V
      Fix bug 1036356: failing assert at... · 5041c552
      vladres 提交于
      Fix bug 1036356: failing assert at Microsoft.CodeAnalysis.CSharp.LocalRewriter.MakeConversion (changeset 1347071)
      5041c552
    • R
    • D
      Core C# IDE Support for string interpolation · 0af01e3d
      dustincampbell 提交于
      The following features have been updated to support interpolated strings:
      
      * Classification - start, mid, and end tokens of an interpolated string are now classified as strings.
      
      * Formatting - the formatter no longer adds spaces before and after insert "holes" in interpolated strings.  From an IDE design perspective, we've decided to not enforce any spacing rules because it's possible that a user may want no spacing for a simple or dotted name (e.g. "\{name}") but *would* want spacing for more complex expressions.
      
      * Completion List - the position after a start or mid token is now considered an expression context, so the completion list appears as expected.
      
      * Automatic Brace Completion - Typing \{ will complete the closing } in standard brace completion scenarios. It will not complete when going back to edit a string unless the edit happens at the end of the line. This is consistent with how brace completion works in general. (We'll need a platform change to do otherwise.)
      
      * Brace Matching - \{ and } braces are highlighted in the editor when the caret is at the start or end of them respectively. (changeset 1346881)
      0af01e3d
    • V
      Test for bug 1040171: ETA crashes if labeled statement is used as an embedded... · aaf3c3aa
      vladres 提交于
      Test for bug 1040171: ETA crashes if labeled statement is used as an embedded statement (changeset 1346866)
      aaf3c3aa
    • J
      There are two possible root causes to this test failure. · d7c2182d
      jmarolf 提交于
      1. File IO error.
      2. Incorrect options given.
      
      #2 will have some explainatory output, while #1 will not.
      
      Adding logging to determine which case is present.
       (changeset 1346801)
      d7c2182d
    • P
  5. 02 10月, 2014 7 次提交
    • N
      d13ae70f
    • S
      DiagnosticFormatter should output line numbers for externalfile locations · e9a5f14e
      srivatsn 提交于
      The Razor folks use the DiagnosticFormatter to format errors that they produce on their side. Some of the errors come from the parser and they create some errors on their own with the location set to Location.Create(...) which creates a ExternalFileLocation. In that case, we still have the proper line span information and should format that.  (changeset 1346489)
      e9a5f14e
    • S
    • S
      5b6de9bf
    • S
      Delete AnalysisContext.RegisterSessionAnalyzer · c8455ba3
      srivatsn 提交于
      The RegisterSessionAnalyzer on an AnalysisContext is a way for one session analyzer to register another session analyzer. We haven't needed such functionality till and currently this doesn't function either because it doesn't call the Initialize methods of the session analyzers. Removing this method for preview. If we get requests for this scenario, we can add this API back.
      
      With this removed, all the Register* methods on context all register actions. This was the only one that registered an analyzer. (changeset 1346448)
      c8455ba3
    • S
      Fix a couple more inconsistencies between release and debug configurations to... · bc9b76ef
      shyamn 提交于
      Fix a couple more inconsistencies between release and debug configurations to fix build breaks in release introduced in C1346108
      
      (I didn't catch this in my previous change because this issue breaks build for DevDivInserionFiles.sln and we don't build this solution as part of test.exe) (changeset 1346435)
      bc9b76ef
    • S
      Rename TSyntaxKind · f445c772
      srivatsn 提交于
      The syntax analyzer APIs take a type parameter which was called TSyntaxKind. There has been feedback that this confused people a lot - people assumed that they are supposed to pass the type corresponding to a syntax node and would pass in something like NamedTypeSyntax and this wasn't found out until it blew up at runtime with an unintelligible error.
      
      This change renames the type variables to TLanguageKindEnum and puts a struct constraint on it so that the common mistake of passing in a node would get caught at compile time. (changeset 1346415)
      f445c772