1. 29 10月, 2014 15 次提交
    • V
      Making lambda codegen to always emit instance delegates. (VB) · 1755139d
      VSadov 提交于
      This way we can have better performance of invocations while keeping parameter list of delegate.Method backwards compatible.
      
      The approach is basically always to emit backing methods into a display class, just that in a case of lambdas not capturing anything, the display classes will not have any fields.
      Also, when display classes do not have any fields, lambdas of all nongeneric methods in a given class can share the same display class and in fact can share the same singleton instance.
      
      ***NO_CI***
       (changeset 1359307)
      1755139d
    • V
      Making lambda codegen to always emit instance delegates. · 3de67f36
      VSadov 提交于
      This way we can have better performance of invocations while keeping parameter list of delegate.Method backwards compatible.
      
      The approach is basically always to emit backing methods into a display class, just that in a case of lambdas not capturing anything, the display classes will not have any fields.
      Also, when display classes do not have any fields, lambdas of all nongeneric methods in a given class can share the same display class and in fact can share the same singleton instance.
      
      ***NO_CI***
       (changeset 1359290)
      3de67f36
    • A
      Add full NuGet package restore to Test.cmd and fix Open samples to direct... · a0ff3566
      angocke 提交于
      Add full NuGet package restore to Test.cmd and fix Open samples to direct packages up to the solution packages directory. (changeset 1359108)
      a0ff3566
    • A
      DevDiv #1024137 - Part 2: "Me" in VB iterators and async · 8c1207ec
      acasey 提交于
      Port of changeset #1357667 to VB.
      
      Bonus: Update the VB IL visualizer to match C# in a case where it was using ToString instead of ToDisplayString.
      
      TODO: Part 3 - "this" in anonymous functions.
      
      CR: chucks (changeset 1358824)
      8c1207ec
    • C
      Test for #1036374 (changeset 1358550) · bf0e2f33
      ChuckStoner 提交于
      bf0e2f33
    • T
      Remove stale items from packages.config files. None of the related projects... · a1ba4247
      tmeschter 提交于
      Remove stale items from packages.config files. None of the related projects were actually using these items. (changeset 1358488)
      a1ba4247
    • P
      PERF: Reduce size of SyntaxFactory's static constructor. · b90a07c9
      Pharring 提交于
      The size (19KB in the case of VB) is because of the initialization code for the NodeTypes static field.
      While this change doesn't change the total size of generated code, it does move it out of the static constructor into its own method. The change is based on the observation that NodeTypes is used only within the GetSerializationData method. The result is transient - it's concatenated with other object sequences. So there's no need to keep this large object array in a static field either. (changeset 1358397)
      b90a07c9
    • W
      Bug1058058: AccessViolationException during EnC · a4050c29
      wochae 提交于
      During EnC, we serialize local variable signatures and keep them in LocalMap for the next time. However, we store the wrong value, so the next EnC would go wrong by using the invalid value from the previous EnC. (changeset 1358334)
      a4050c29
    • P
      [De Minimis] Remove some unnecessary thread-safetiness from UnboundLambda and LambdaSymbol. · 0d87182d
      pgavlin 提交于
      When updating lambda return type inference to analyze ref returns, I noticed that BoundLambda.InferredReturnType was unnecessarily thread-safe: all callers of this method were either calling through an instance whose inferred return type had already been set or on an instance that had not been published to multiple threads. The same was true for LamdbaSymbol.SetInferredReturnType. I have refactored BoundLambda to set the inferred return type and related information at construction time (i.e. before the object is published to multiple threads) and established the invariant that InferredReturnType is only called on BoundLambda instances that have an inferred return type.
      ***NO_CI***
       (changeset 1358150)
      0d87182d
    • B
      Allow Extract Method, Introduce Variable on expressions in string... · f70a0bd0
      BalajiKris 提交于
      Allow Extract Method, Introduce Variable on expressions in string interpolations. Fixes bugs 1064798 and 1064803. (changeset 1357978)
      f70a0bd0
    • B
      A boolean condition seems to have been inadvertantly flipped in CS 1317861... · 63a00093
      BalajiKris 提交于
      A boolean condition seems to have been inadvertantly flipped in CS 1317861 (portable workspace) which caused brace completion to not work after string literals. Fixing the conditional and enabling an unit test. (changeset 1357958)
      63a00093
    • A
      Fix a crash while compiling an expression body with a lambda referencing a... · a94e2e0e
      AlekseyTs 提交于
      Fix a crash while compiling an expression body with a lambda referencing a parameter. FIxes #313. (changeset 1357848)
      a94e2e0e
    • A
    • M
      Fix for bug 1066483: VS crashes when bringing up lightbulb with a compiler... · 2c3958a8
      manishv 提交于
      Fix for bug 1066483: VS crashes when bringing up lightbulb with a compiler warning turned into an error.
      
      Ensure that the correct warning level is returned for compiler warnings escalated to errors. (changeset 1357804)
      2c3958a8
    • C
      EE: Support object id in VB Expression Compiler · 0c488b02
      ChuckStoner 提交于
      Note this uses Tomas' proposed object id syntax "$[1-9][0-9]+" rather than the Dev12 EE syntax "ObjId[1-9][0-9]+".
      
      If we decide to use the Dev12 syntax instead, the Expression Compiler will need to call DkmInspectionContext.GetClrObjectIdType() when binding to check if there is an object with the given id that may shadow another symbol in scope with the same name.
      
      CR: acasey (changeset 1357770)
      0c488b02
  2. 21 10月, 2014 4 次提交
    • A
      DevDiv #1024137 - Part 1: "this" in C# iterators and async · 1c2452f7
      acasey 提交于
      When the callstack tells us that we're in a state machine MoveNext method, we want to bind as though we're really in the iterator or async method that caused the state machine to be generated.  Parameters and locals are handled by special binders, but "this" and "base" won't work unless the binder has an appropriate ContainingType, which in turn depends on ContainingMemberOrLambda.
      
      Unfortunately, the generated code (and the custom debug info) lacks sufficient information to map back to a single member.  All we get is the name of the member in the mangled name of the state machine type.  We apply a heuristic to choose an appropriate overload, if there are multiple, and accept that sometimes we will pick the wrong one.  We believe that picking the wrong one will be benign since the binder uses relatively few properties of the ContainingMemberOrLambda and the ones it does (mainly, ContainingType) are consistent across all overloads.
      
      Bonus: merge ThisReferenceRewriter into CapturedVariableRewriter.  This saves us a pass over the bound tree and eliminates an intermediate state in which "this" has the wrong type (ThisReferenceRewriter used to break it and let CapturedVariableRewriter correct it).
      
      TODO: Part 2 - "Me" in VB iterators and async.
      TODO: Part 3 - "this" in anonymous functions.
      
      CR: ChuckS, KevinH (changeset 1357667)
      1c2452f7
    • N
    • C
      NullReferenceException in GetDiagnostics for optional parameter in security... · a89e78b5
      ChuckStoner 提交于
      NullReferenceException in GetDiagnostics for optional parameter in security attribute (changeset 1357563)
      a89e78b5
    • M
      Assert that SynthesizedInstanceMethodsSymbols are not static. · db4ab560
      matell 提交于
      The code for TryGetThisParameter handed the case where the method symbol represented a static method.  However, this should never be the case for an SynthesizedInstanceMethodSymbol, so instead we just assert that the method is non-static. (changeset 1357515)
      db4ab560
  3. 20 10月, 2014 1 次提交
  4. 17 10月, 2014 12 次提交
  5. 16 10月, 2014 6 次提交
    • N
    • T
      Replace checked-in analyzers with the the new Microsoft.Net.RoslynDiagnostics NuGet package. · 8bf681c7
      tmeschter 提交于
      This also updates Microsoft.Net.ToolsetCompiler to the corresponding version. (changeset 1355122)
      8bf681c7
    • M
      Fix for bug 1046530: Should the strings in... · 7990f04a
      manishv 提交于
      Fix for bug 1046530: Should the strings in Microsoft.CodeAnalysis.DiagnosticFormatter.GetMessagePrefix be localized?
      
      Localize the diagnostic severity in DiagnosticFormatter.GetMessagePrefix. (changeset 1355104)
      7990f04a
    • M
      FIx for bug 1038237: Incorrect warnings in Error List for #pragma warning... · 770e8ec7
      manishv 提交于
      FIx for bug 1038237: Incorrect warnings in Error List for #pragma warning disable'd code with Closed File Diagnostics enabled
      
      The issue here is that root of the syntax trees recovered from temporary storage stream didn't have the ContainsDirective flag set, even when it had pragma directives. Hence, while computing diagnostics for closed files, we intermittently see diagnostics which have been suppressed by pragma directives appear in the error list.
      Fix is to ensure that the stream based constructor for DirectiveTriviaSyntax node has this flag set, just like it's other constructors. (changeset 1355099)
      770e8ec7
    • C
      Update assert in TypeUnification.CanUnify for substitutions from type... · 99239f9f
      ChuckStoner 提交于
      Update assert in TypeUnification.CanUnify for substitutions from type parameter to type parameter (changeset 1354882)
      99239f9f
    • M
      Removed code from MSBuildWorkspace that was trying to support adding/removing additional documents. · 7509b3c3
      mattwar 提交于
      Moved default host services logic from MSBuildWorkspace to new type DesktopMefHostServices type.
      
      Changed CommandLineProject to make workspace parameter optional. You only need to specify workspace if want to override behavior of some of the services (beyond default).
      
      Added WorkspaceServices.GetRequiredService and LanguageServices.GetRequiredService API that throws InvalidOperationException if service is not available.
      
      Changed Workspace.AddDocument and Workspace.AddAdditionalDocument to take DocumentInfo instead of multiple parameters (for future proofing signature.)
      
      Added ApplyChangesKind enum values for analyzers and additional documents
      
      Changed Workspace TryApplyChanges to check for all unsupported changes before starting to apply.
      Changed separate *apply* methods to default to calling equivalent OnXXX method instead of throwing.
      
      Changed CustomWorkspace.CanApplyChanges to default to true for all kinds.
      Added error messages for each ApplyChangesKind
      
      Added missing WithXXX methods from DocumentInfo (changeset 1354869)
      7509b3c3
  6. 15 10月, 2014 2 次提交