- 14 1月, 2015 11 次提交
-
-
由 KirillOsenkov 提交于
-
由 KirillOsenkov 提交于
-
由 TomasMatousek 提交于
Public types CommonMemberResolutionKind, CommonMemberResolutionResult, CommonOverloadResolutionResult are not used nor returned by any Roslyn public API. Remove them. (changeset 1395377)
-
由 TomasMatousek 提交于
-
由 Kevin_H 提交于
-
由 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)
-
由 srivatsn 提交于
-
由 nmgafter 提交于
-
由 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)
-
由 VSadov 提交于
The change basically moves the stack guard from ParseExpression down to ParseSubExpression Fixes #446 (changeset 1395172)
-
由 nmgafter 提交于
Changeset shamelessly stolen from angocke (changeset 1395147)
-
- 09 1月, 2015 29 次提交
-
-
由 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)
-
由 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)
-
由 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)
-
由 angocke 提交于
Temporarily rollback changeset until I can fix up CI infrastructure to handle native test DLLs. (changeset 1394561)
-
由 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)
-
由 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)
-
由 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)
-
由 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)
-
由 jaredpar 提交于
-
由 nmgafter 提交于
-
由 acasey 提交于
Skip intermittently failing test SuppressSyntaxDiagnosticsOnRaiseEventAccessorBasic (DevDiv #1103442). (changeset 1393924)
-
由 mattwar 提交于
Sealed CustomWorkspace to remove temptation to derive from it, and to encourage deriving from Workspace directly. (changeset 1393855)
-
由 mattwar 提交于
Add implementation to support workspaces that want to enable adding/removing projects and changing options duringTryApplyChanges (such as CustomWorkspace). (changeset 1393845)
-
由 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)
-
由 nmgafter 提交于
-
由 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)
-
由 manishv 提交于
I also found couple of bugs in the VB implementation of the analyzers during this exercise, which have been fixed. (changeset 1393711)
-
由 brettv 提交于
-
由 v_tagoo 提交于
Updating VSIXManifests to use Version=[4.5,) which is required to support the change to NetFX 4.6. (changeset 1393698)
-
由 mattwar 提交于
Added optional filePath argument to AddDocument overloads. (changeset 1393692)
-
由 AlekseyTs 提交于
C# Null Coalesce + Conditional Access optimization – do not treat decimal zero as IL constant. Fixes #470. ***NO_CI*** (changeset 1393664)
-
由 TomasMatousek 提交于
-
由 ChuckStoner 提交于
-
由 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)
-
由 pgavlin 提交于
***NO_CI*** (changeset 1393197)
-
由 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)
-
由 TomasMatousek 提交于
Removes dependency on MDBG from PdbUtilities and cleans up SymUnmanagedReaderExtensions and CustomDebugInfoReader. (changeset 1393106)
-
由 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)
-
由 TomasMatousek 提交于
-