1. 24 12月, 2014 40 次提交
    • P
      Change Color Color handling to use binding instead of lookup. · 92b896ba
      pgavlin 提交于
      The Color Color handling in the binder originally used lookup to decide the meaning of an ambiguous identifier as a simple name or type name instead of binding. This was done for two reasons:
      - Binding is more expensive than lookup
      - Binding may have side effects that are undesirable depending on how the Color Color binding is ultimately resolved
      
      Unfortunately, this is not correct: the meaning of an identifier as outlined in the spec is defined by binding. This caused the compiler to incorrectly fail to recognize Color Color in situations where a simple name or type name lookup is ambiguous but a bind of the same is not. This change replaces the lookups used in Color Color with binds, which brings Roslyn's behavior back in line with Dev12 and the spec in cases that fit such cases.
      
      This change is likely to be slightly perf-positive in cases involving a simple name that does not bind to a symbol that qualifies for the Color Color rule: in this case, the old code performed a lookup followed by a bind, whereas the new code simply performs a bind and returns the result. There is likely to be a perf penalty in a true Color Color case, however, as the bound node is larger and the new code is unconditionally binding the type even in the case where the type will not be used (whereas the old code would simply look up the type).
      ***NO_CI***
       (changeset 1385215)
      92b896ba
    • J
      Add missing entries in packages.config to a bunch of our projects. · c3ceca1b
      jasonmalinowski 提交于
      These projects were already consuming these packages in the project files, but didn't declare so in the packages.config. This brings stuff more up to sync. (changeset 1385208)
      c3ceca1b
    • T
      The IDE and the compiler didn't agree on the breakpoint span for VB let... · 54fd5167
      TomasMatousek 提交于
      The IDE and the compiler didn't agree on the breakpoint span for VB let clauses. Fixes the IDE to match the compiler. (changeset 1385141)
      54fd5167
    • J
      Delete MefV1HostServices.Default. · 407239ec
      jasonmalinowski 提交于
      This API was left in by accident from the portable MEF switch. It creates a container that is empty since it's looking for MEFv1 attributes in a MEFv2 assembly. Any use of the resulting HostServices will just fail.
      
      CR: mavasani; jaredpar (changeset 1385133)
      407239ec
    • A
      Change the hardcoded version style to include the full Roslyn semantic... · e44f79d1
      angocke 提交于
      Change the hardcoded version style to include the full Roslyn semantic version, rather than just the major version number.
      ***NO_CI***
       (changeset 1385097)
      e44f79d1
    • A
      Update the Roslyn solution to build our executables as both 32 and 64-bit. · ee555d23
      angocke 提交于
      ***NO_CI***
       (changeset 1384854)
      ee555d23
    • B
      Fixes bug 1069237 - conflict resolution doesn't work inside expression bodied... · dffcdabc
      BalajiKris 提交于
      Fixes bug 1069237 - conflict resolution doesn't work inside expression bodied lambdas. (changeset 1384823)
      dffcdabc
    • N
      Reword quoted overload resolution rule to align with proposed spec text.... · 03be7044
      nmgafter 提交于
      Reword quoted overload resolution rule to align with proposed spec text. (Comment change only) (changeset 1384807)
      03be7044
    • M
      Fix for bug 1094337: Remove /option switch in command line compilers and... · 5566daaf
      manishv 提交于
      Fix for bug 1094337: Remove /option switch in command line compilers and remove global options and culture on AnalyzerOptions
      
      Remove "/option" command line switch added for custom key-value pair analyzer options. There is no way to specify these options in the msbuild project file, so we will just revert the command line support and add it back once the end-to-end scenario is implemented for analyzer options.
      
      Additionally, also remove the Culture passed into the analyzer options. Diagnostic analyzer authors need not report localized diagnostics, just localizable diagnostics, which can be localized for any given culture by the analyzer host (IDE/command line compiler). (changeset 1384781)
      5566daaf
    • M
      Fix for bug 1089200: Previewless subclasses of CodeActionWithOptions should... · 12fdf4dd
      manishv 提交于
      Fix for bug 1089200: Previewless subclasses of CodeActionWithOptions should not require empty override of ComputeOperationsAsync(CancellationToken)
      
      Override ComputeOperationsAsync(CancellationToken) in CodeActionWithOptions to return empty operations.
      Additionally, add an internal virtual GetOperationsCoreAsync on CodeAction, which is overriden in CodeActionWithOptions to invoke GetOperations(options, cancellationToken). This avoids code action hosts to explicitly check for CodeAction's runtime type to get code action operations. (changeset 1384776)
      12fdf4dd
    • A
      C#: Do not bind constructor initializer for an “external” constructor, report... · ff62c71d
      AlekseyTs 提交于
      C#: Do not bind constructor initializer for an “external” constructor, report an error if constructor initializer is present in code. This prevents unexpected diagnostics. Fixes #386.
      ***NO_CI***
       (changeset 1384736)
      ff62c71d
    • J
      The documentation for PortableExecutableReference::CreateDocumentationProvider... · c9f7c203
      jaredpar 提交于
      The documentation for PortableExecutableReference::CreateDocumentationProvider appears to be incorrect. It suggests the method can only be called once per instance which is inconsistent with the usage in the property DocumentationProvider. Updated documentation to match the usage behavior.
       (changeset 1384654)
      c9f7c203
    • N
    • A
      Metadata: associate custom attributes with correct rows in generic parameters... · ade83e7b
      AlekseyTs 提交于
      Metadata: associate custom attributes with correct rows in generic parameters metadata table. Fixes #121. (changeset 1384436)
      ade83e7b
    • M
      Fix for bug 1036352: Update preview dialog to be able to display all types of... · 839a96ff
      manishv 提交于
      Fix for bug 1036352: Update preview dialog to be able to display all types of changes including added / removed documents, changes to additional documents, references etc.
      
      Add support for references and additional document changes to preview changes dialog. (changeset 1384198)
      839a96ff
    • M
      3afda7f3
    • T
      Add an overload of EmitDifferent that doesn't take isAddedSymbol - we only... · 659fead1
      TomasMatousek 提交于
      Add an overload of EmitDifferent that doesn't take isAddedSymbol - we only need isAddedSymbol temporarily until CLR bug 1094313 is fixed. It will be simpler to remove/obsolete the overload once it's not needed. (changeset 1384161)
      659fead1
    • M
      SyntaxGenerator changes (changeset 1384116) · 307e781a
      mattwar 提交于
      307e781a
    • T
      Allows adding members of any visibility during debugging session. · 3de74bcb
      TomasMatousek 提交于
      Due to CLR bug 1094313 the added members can't be referenced from another assembly. For now we report a rude edit if we detect a MemberRef or TypeRef to a symbol added during debugging.
       (changeset 1384081)
      3de74bcb
    • W
      VB: State machine variable hoisting. · 589681ed
      wochae 提交于
      Porting the recent C# changes to support EnC for VB Async and Iterator. (changeset 1384053)
      589681ed
    • P
      MultiDictionary API changes. · d87c7faf
      pgavlin 提交于
      Many uses of MultiDictionary incur unnecessary overhead due to double-lookup or key enumeration and value lookup patterns and unnecessary allocations. This change enables single-lookup patterns, removes a number of allocations from typical uses of MultiDictionary, and cuts the surface area down to what it actually used by the product.
      ***NO_CI***
       (changeset 1384052)
      d87c7faf
    • T
      The symbol matcher wasn't correctly handling TypeRefs: it mapped their... · 4f170110
      TomasMatousek 提交于
      The symbol matcher wasn't correctly handling TypeRefs: it mapped their containing assembly to the same assembly as the target assembly.
      
      Instead it should map source modules from all generations to the target assembly and keep other modules unmapped. (changeset 1384022)
      4f170110
    • P
    • T
      Apply the AppDomain's policy when loading analyzer dependencies. · bd7ca1ca
      tmeschter 提交于
      When the AppDomain.CurrentDomain.AssemblyResolve event is fired to resolve an analyzer's dependency, the ResolveEventArgs.Name property has the name of the desired assembly *before* any policies (like binding redirects) have been applied. Since we're doing our own assembly resolution it is up to us to apply policy, and we're advised that this is generally the correct thing to do. (changeset 1383995)
      bd7ca1ca
    • P
      Fix a crash that occurs when lowering await expressions with dynamically-typed results. · 71b71689
      pgavlin 提交于
      The await rewriter was attempting to manually replace "dynamic" with "object" in an expression's awaiter type and related methods for await expressions that are typed as "dynamic". Not only is this unnecessary--this sort of rewrite will be done at emit time--it is also incorrect given the pattern-based nature of await binding.
      
      I also simplified the code that finds and validates the various methods and types needed for an await expression while making this fix.
      ***NO_CI***
       (changeset 1383986)
      71b71689
    • M
      Fix bug 1038031: Make BatchFixAllProvider's diagnostic computation parallelized · dec7047a
      manishv 提交于
      Heejae recently refactored the diagnostic service's diagnostic getter module to be thread safe. This change builds on that and makes the batch fix all provider query diagnostics for documents in parallel. (changeset 1383979)
      dec7047a
    • N
      1090472-Ensure retargeted error symbols cause use-site errors · 84685f57
      nmgafter 提交于
      Also includes VB implementation
       (changeset 1383936)
      84685f57
    • A
      C# Method Type Argument Inference - Implement tie-breaker between object and... · 75c73cc1
      AlekseyTs 提交于
      C# Method Type Argument Inference - Implement tie-breaker between object and dynamic types. Fixes #56.
      ***NO_CI***
       (changeset 1383703)
      75c73cc1
    • A
      VB: Project Level Aliases should have location with kind None. · de5ca7bd
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1383690)
      de5ca7bd
    • J
      A watson bug from TFS CodeLens components revealed two issues in the parser: · 0ae3e7fa
      jaredpar 提交于
           1. The recursive parsing of statements, which occurs in delegate declarations or nested blocks, didn't have the same stack overflow guard that recursive expressions had.
           2. The parser was subject to unnecessary recursion in mismatched brace scenario which lead to deep recursion when combined with delegate declarations
      
           A concrete example of the second issue is the following:
      
             class C {
               void Test() {  // No closing }
               delegate void D1();
               delegate void D2();
             }
      
           In the above scenario both D1 and D2 will be parsed as delegate statement expressions and not delegate declarations.  In files with a large number of delegates, common in generated code, this quickly lead to a stack overflow scenario.
      
           Our guards sufficiently protect us from a crash here however the editing experience is very poor.  Once a stack guard is hit the parser essentially gives up on the remainder of the file.  This meant a simple mismatched brace could kill the editing experience in a file.  Discussed this with Neal and we decided the appropriate fix here was to not recurse into a delegate declaration if it lacked the opening {.
      ***NO_CI***
       (changeset 1383579)
      0ae3e7fa
    • C
      Add a very small implicit cache for Compilations. This will hopefully address... · d5d4d44b
      chandera 提交于
      Add a very small implicit cache for Compilations. This will hopefully address a regression in Ausgov Winforms caused by the move to explicit caching.
      ***NO_CI***
       (changeset 1383551)
      d5d4d44b
    • D
      IDE Support for C# using static (changeset 1383492) · b49f841b
      dustincampbell 提交于
      b49f841b
    • J
    • J
      This makes the following changes to the VBCSCompiler Process · 73f88cde
      jaredpar 提交于
           1. Removes the shared state and locks in favor of a more event driven style model.  Values which were previously represented as writes to shared state are now represented as Task<T> values.  The server will create the necessary Task values for the given state of the server, wait on any of them to complete and then handle them in a defined order.  This eliminates a couple of remaining race condition in the server.
      
           2. In the case of a client disconnect the server will initiate a soft shutdown.  It will accept no new connections but wait for the remaining connections to complete processing before terminating the process.
      
           There is no fear of state corruption here.  The goal is parity with the native command line compiler.  If the user kicked off an expensive compilation they could terminate it with Ctrl+C and free up machine resources (or simply stop the compiler from repeatedly page faulting the machine).  Roslyn needs to mimic this behavior as best as possible with VBCSCompiler.
      
           To be clear: this allows the server to complete while the compiler is still compiling code.  It will only do so for connections which were severed by the client disconnecting from the named pipe.
      
           3. In the case of an exception serving the compilation task the server will log the error and terminate itself immediately via Environment.Exit.  Such an exception represents a flaw in the compiler itself and we can make no guarantees about the state of shared data in the compiler.  Hence we terminate all existing task
      
       (changeset 1383458)
      73f88cde
    • P
      PERF: Reduce SharedReadableStream overhead · 7cda6c9c
      Pharring 提交于
      A profile showed high CPU counts in SharedReadableStream.ReadByte/ReadArray (see below) for deserializing recoverable syntax trees. This is because of the overhead in UnmanagedMemoryAccessor.ReadByte. This can be fixed by doing our own pointer math given that the IntPtr is already made available through the ISupportDirectMemoryAccess interface.
      
      Name                                                                            Inc %
      Microsoft.CodeAnalysis.Workspaces.Desktop.ni!...SharedReadableStream.ReadByte() 31.3
      + mscorlib.ni!System.IO.UnmanagedMemoryAccessor.ReadByte(Int64)                  30.0
      |+ mscorlib.ni!UnmanagedMemoryAccessor.InternalReadByte                          27.8
      ||+ mscorlib.ni!SafeBuffer.AcquirePointer                                        11.6
      ||+ mscorlib.ni!SafeBuffer.ReleasePointer                                         9.1
      ||+ ?!?                                                                           1.8
      ||+ clr!_EH_prolog3_catch                                                         0.8
      ||+ clr!SafeHandle::DangerousRelease                                              0.1
      ||+ clr!SafeHandle::DangerousAddRef                                               0.1
      |+ mscorlib.ni!UnmanagedMemoryAccessor.EnsureSafeToRead                           0.8
      |+ mscorlib.ni!SafeBuffer.AcquirePointer                                          0.3
      |+ mscorlib.ni!SafeBuffer.ReleasePointer                                          0.0
      + mscorlib.ni!UnmanagedMemoryAccessor.EnsureSafeToRead                            0.2
      + mscorlib.ni!UnmanagedMemoryAccessor.InternalReadByte                            0.2 (changeset 1383444)
      7cda6c9c
    • N
      interpolated string revision per LDM decisions · 64570b21
      nmgafter 提交于
      still outstanding is the target-type conversion to FormattableString and IFormattable. (changeset 1383442)
      64570b21
    • P
      Fix a crash during lowering of string concatenation expressions where one... · 2ce7012b
      pgavlin 提交于
      Fix a crash during lowering of string concatenation expressions where one argument is a null coalescing operator whose RHS has a constant null value.
      ***NO_CI***
       (changeset 1383405)
      2ce7012b
    • J
      implement GFU inside TypeOf for VB (changeset 1383403) · da96991e
      jmarolf 提交于
      da96991e
    • A
      VB: Define special error type symbol to represent a pointer type, enables... · a7c027ef
      AlekseyTs 提交于
      VB: Define special error type symbol to represent a pointer type, enables accurate comparison of signatures of methods imported from metadata.
      ***NO_CI***
       (changeset 1383354)
      a7c027ef
    • A
      C#: Ensure correct semantics of an 'as' operator when target type is a nullable type. · 0587bdac
      AlekseyTs 提交于
      ***NO_CI***
       (changeset 1383309)
      0587bdac