1. 14 1月, 2015 12 次提交
    • P
      Rationalize ByteSequenceComparer. · 4b402939
      pgavlin 提交于
      ByteSequenceComparer has been updated as follows:
      - The implementation of IEqualityComparer<IEnumerable<byte>> has been removed
      - The implementations of IEqualityComparer<{byte[], ImmutableArray<byte>}> are now explicit
      - The various overloads of EqualsValue and GetHashCodeValue have been renamed to Equals and GetHasCode, respectively.
      ***NO_CI***
       (changeset 1395450)
      4b402939
    • K
      Fix typo: mehthod -> method. (changeset 1395448) · 54a66c37
      KirillOsenkov 提交于
      54a66c37
    • K
    • T
      Remove unused code/API · 86c7f199
      TomasMatousek 提交于
      Public types CommonMemberResolutionKind, CommonMemberResolutionResult, CommonOverloadResolutionResult are not used nor returned by any Roslyn public API. Remove them.
       (changeset 1395377)
      86c7f199
    • T
      78e84b0b
    • K
      2c4e1517
    • T
      Synthesized VB names · e7a20119
      TomasMatousek 提交于
      1) Assigns each member a "member ordinal" - the index in the members array of the containing type. The ordinal is propagated thru lowering rewriters which uses it to make generated names unique.
           2) We no longer calculate "overload ordinal" for names of state machine types, we use the member ordinal of the async/iterator method instead.
           3) Removes GenerateTempNumber from TypeCompilationState. Combination of method ordinal and other indices is used to make generated names unique:
           - Display classes use ordinal of the method containing the lambda and closure scope ordinal (unique within a method). Static display class is shared across all non-generic methods of a containing class and thus doesn't need a unique number in name.
           - Lambda methods include containing method ordinal (unless emitted to a display class whose name already includes it) and lambda ordinal (unique within a method).
           - The same for fields caching lambdas.
           - Delegate relaxation stubs and their closures have a separate numbering and are distinguished from regular lambdas/closures, since they are immutable and EnC doesn't need to map them across generations.
           - Late-bound AddressOf operator oddly creates real closure and is thus not considered a delegate relaxation for the purposes of synthesized naming.
           - Properties generated to override inherited WithEvent properties are assigned ids in the source order of Handles clauses.
      
           In order to guarantee uniqueness of the names added during EnC include generation ordinal in synthesized names  wherever we use method ordinal. Generation ordinal 0 (regular build) is omitted - the additional number is only added to names of synthesized members created during EnC compilation. (changeset 1395267)
      e7a20119
    • S
    • N
    • J
      This change removes all uses of Assert.DoesNotThrow. This is no longer a part... · d57807dd
      jaredpar 提交于
      This change removes all uses of Assert.DoesNotThrow. This is no longer a part of the xUnit public API and continuing to use this in our code base is preventing us from moving to a standard version of xUnit.
      
      Here is the issue which tracks removing this API and the justification for doing so.
      
      https://github.com/xunit/xunit/issues/188
      
      In summary: it's a redundant call. If the code throws the test fails with or without this method.  (changeset 1395207)
      d57807dd
    • V
      Preventing StackOverflow in deeply nested binary expressions. · d5370018
      VSadov 提交于
      The change basically moves the stack guard from ParseExpression down to ParseSubExpression
      Fixes #446
       (changeset 1395172)
      d5370018
    • N
      921838-Allow cref to bind to inaccessible symbols · e1e49e9c
      nmgafter 提交于
      Changeset shamelessly stolen from angocke (changeset 1395147)
      e1e49e9c
  2. 09 1月, 2015 28 次提交
    • S
      Adding an analyzer to the CodeAnalysis analyzers package that issues an error... · 93209407
      srivatsn 提交于
      Adding an analyzer to the CodeAnalysis analyzers package that issues an error if someone tries to implement an interface marked with an attribute.
      
      Adding a internal type (System.Runtime.CompilerServices.InternalImplementationOnlyAttribute) to CodeAnalysis.dll and applying it to ISymbol so that we can prevent folks from implementing ISymbol (in order for us to be able to make changes to it in the future). Chose the System namespace because the LDM wants this to be a compiler feature in the future. The analyzer just checks by name and so the type can be internal and if a different dll needs it, it can define the attribute by itself. (changeset 1394725)
      93209407
    • P
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual... · 769e907a
      pgavlin 提交于
      Use a compatible MethodInfo when generating MethodCallExpressions for virtual methods on value types.
      
      When generating a call to a virtual method on a value type, the least overridden method virtual method is only used in special circumstances. These circumstances are exactly the checks performed by MayUseCallForStructMethod during IL emission when deciding whether or not to call a method with a value type receiver directly). This change applies the same rules when generating MethodCallExpressions for value type receivers in expression lambdas, bringing the generated code back in line with Dev12.
      ***NO_CI***
       (changeset 1394691)
      769e907a
    • M
      Add a CodeAnalysis diagnostic for detecting memory leaks in implementation of... · 20070331
      manishv 提交于
      Add a CodeAnalysis diagnostic for detecting memory leaks in implementation of analyzers (DoNotStorePerCompilationDataOntoFields): Instance of a diagnostic analyzer might outlive the lifetime of compilation (when executed in the IDE). Hence, storing per-compilation data, such as symbols, into the fields of a diagnostic analyzer might cause stale compilations to stay alive and cause memory leaks. Instead, one should store this data on a separate type instantiatied in a compilation start action, registered using AnaylsisContext.RegisterCompilationStartActionName API. An instance of this type will be created per-compilation and it won't outlive compilation's lifetime, avoiding memory leaks.
      
      Analyzer implementation: Analyzer tracks all field declarations within analyzer types (marked with DiagnosticAnalyzerAttribute) and flags if it's variable type declaration has any type syntax descendant that binds to a type implementing ISymbol or has Compilation in its type chain.
      
      I have also added a few positive and negative tests for the diagnostic. (changeset 1394660)
      20070331
    • A
      Temporarily rollback changeset until I can fix up CI infrastructure to handle... · 244160b0
      angocke 提交于
      Temporarily rollback changeset until I can fix up CI infrastructure to handle native test DLLs. (changeset 1394561)
      244160b0
    • A
      Revert csc2/vbc2 to the old behavior of printing an error message when the... · ccc0f7d9
      angocke 提交于
      Revert csc2/vbc2 to the old behavior of printing an error message when the keepalive argument is ill formed.
      
      This change also repairs the native keep alive tests, which were not being run due to not having the right name. Similar end-to-end tests have been added in case these tests are similarly disabled in the future. (changeset 1394531)
      ccc0f7d9
    • B
      Better name generation while extracting nullables. In ConditionalAccess... · be73838f
      BalajiKris 提交于
      Better name generation while extracting nullables. In ConditionalAccess Expression ?. if we have a member binding expression, we now use that to get a smart name. If nothing else works and if the original definition is a nullable, we give back the default parameter name (v) we use in for built in types. (changeset 1394509)
      be73838f
    • A
      C#: ?. invocation in context of a statement-expression should be allowed even... · dd8f041f
      AlekseyTs 提交于
      C#: ?. invocation in context of a statement-expression should be allowed even if result type of the invocation cannot be made nullable.
      ***NO_CI***
       (changeset 1394508)
      dd8f041f
    • M
      Fix implementation of HasLeadingTrivia and HasTrailingTrivia for SyntaxNode,... · f0c4c0ac
      mattwar 提交于
      Fix implementation of HasLeadingTrivia and HasTrailingTrivia for SyntaxNode, SyntaxToken and SyntaxNodeOrToken.
      
      The previous implementation was incorrect when zero-length trivia (elastic markers) were the only trivia. (changeset 1394442)
      f0c4c0ac
    • J
    • N
      e4d141a3
    • A
      Skip intermittently failing test... · 3abbc44d
      acasey 提交于
      Skip intermittently failing test SuppressSyntaxDiagnosticsOnRaiseEventAccessorBasic (DevDiv #1103442). (changeset 1393924)
      3abbc44d
    • M
      Sealed CustomWorkspace to remove temptation to derive from it, and to... · e78a041e
      mattwar 提交于
      Sealed CustomWorkspace to remove temptation to derive from it, and to encourage deriving from Workspace directly. (changeset 1393855)
      e78a041e
    • M
      Add implementation to support workspaces that want to enable adding/removing... · 146532ec
      mattwar 提交于
      Add implementation to support workspaces that want to enable adding/removing projects and changing options duringTryApplyChanges (such as CustomWorkspace).
       (changeset 1393845)
      146532ec
    • S
      Change "Preview Changes" and "Fix All Occurrences" to be implemented as... · bdfe12d0
      shyamn 提交于
      Change "Preview Changes" and "Fix All Occurrences" to be implemented as 'flavored' actions and remove the custom support that we had implemented for invoking these actions via the light bulb preview pane. (changeset 1393815)
      bdfe12d0
    • N
      move Open\src\docs to Open\Docs (changeset 1393810) · 40ae213c
      nmgafter 提交于
      40ae213c
    • N
      1099105-Use special overload resolution rules for string.Format · 2bdc081f
      nmgafter 提交于
      We need to use specialized overload resolution rules when creating a call
      to String.Format for an interpolated string, to avoid calling a params method
      in unexpanded form. (changeset 1393796)
      2bdc081f
    • M
      Add tests for recently added CodeAnalysis meta-analyzers. · f6c9edb7
      manishv 提交于
      I also found couple of bugs in the VB implementation of the analyzers during this exercise, which have been fixed. (changeset 1393711)
      f6c9edb7
    • B
      eaad86cb
    • V
      Updating VSIXManifests to use Version=[4.5,) which is required to support the... · 0c84645c
      v_tagoo 提交于
      Updating VSIXManifests to use Version=[4.5,) which is required to support the change to NetFX 4.6. (changeset 1393698)
      0c84645c
    • M
      Fix for bug 1101013 · cd68d032
      mattwar 提交于
      Added optional filePath argument to AddDocument overloads. (changeset 1393692)
      cd68d032
    • A
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero... · 505b888f
      AlekseyTs 提交于
      C# Null Coalesce + Conditional Access optimization – do not treat decimal zero as IL constant. Fixes #470.
      ***NO_CI***
       (changeset 1393664)
      505b888f
    • T
    • C
    • M
      Added DocumentEditor -- a sub type of SyntaxEditor with document and semantic model accessible. · ee41c869
      mattwar 提交于
      Added SolutionEditor -- enables editting multiple documents.
      
      Added SyntaxEditor extensions -- add base and interface types.
      
      Added SymbolEditor extensions -- set base type for symbol & get reference to base type or interface declaration for a symbol.
      
      Changed SymbolEditor to use DocumentEditor instead of SyntaxEditor in callbacks. (changeset 1393203)
      ee41c869
    • P
      Remove all Obsolete public APIs. · 00868214
      pgavlin 提交于
      ***NO_CI***
       (changeset 1393197)
      00868214
    • T
      Currently we include a method ordinal to the name of a synthesized member... · 74142c4f
      TomasMatousek 提交于
      Currently we include a method ordinal to the name of a synthesized member produced during lowering of the method. When a method is added during EnC in the middle of existing members the ordinal is not enough to avoid name conflicts with the previously emitted synthesized members.
           In order to guarantee uniqueness of the names we now include generation ordinal in synthesized names as well, wherever we use method ordinal. Generation ordinal 0 (regular build) is omitted - the additional number is only added to names of synthesized members created during EnC compilation.
      
           An alternative would be to find the highest existing ordinal and start indexing EnC members from there. Such approach would probably work but including the generation number is much simpler and imposes less constraints on the EnC compilation.
      
           In addition to including the generic ordinal this changeset also fixes a couple of bugs that were previously masked or we haven't had coverage of the scenarios:
           - the EnC changeset calculation was not properly handling additions of synthesized members into existing synthesized classes.
           - SymbolMatcher didn't map local variable types forward correctly for variables of synthesized types.
           - SymbolMatcher didn't handle generic static lambda display classes with generic. Currently we create generic parameters for these classes via alpha renaming of the type parameters of the top-level generic method. VB is constructing fresh generic parameters, which seems a better approach. I'll leave changing this to a follow-up changeset.
      
           As a byproduct of this change we can now enable editing of methods containing dynamic operations. It just works now! Each update of such method creates a new set of dynamic sites. We don't attempt to reuse existing sites. It's little bit wasteful but it also avoids the need of invalidating the call-site caches. (changeset 1393184)
      74142c4f
    • T
      Removes dependency on MDBG from PdbUtilities and cleans up... · bf241425
      TomasMatousek 提交于
      Removes dependency on MDBG from PdbUtilities and cleans up SymUnmanagedReaderExtensions and CustomDebugInfoReader. (changeset 1393106)
      bf241425
    • M
      Fix for bug 612002 · b495c9ac
      mattwar 提交于
      Undos previous fix that changed the compiler to always emitted a generated property name of __result for EndInvoke.
      
      The new change only adds the underscores if there is a name conflict. In this way, we stay metadata compatible with the prior native compiler.
      
      Also added same fix to generated parameters for BeginInvoke, callback and object.
      
      Added test cases. (changeset 1393061)
      b495c9ac