- 09 1月, 2015 35 次提交
-
-
由 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 提交于
-
由 RoslynTeam 提交于
Move Compilation.WithAnalyzers out of Compilation and make it an extension method. (changeset 1392997)
-
由 manishv 提交于
AnalyzerDriver is currently tightly coupled with the sequence and kind of CompilationEvents being produced by the compilation. It requires that the first event on the queue is a compilation started event and the final event is the compilation end event. If either of these events are not produced OR are out of expected order then the driver can deadlock. This change cleans this up by: 1) Ignoring the CompilationStartedEvent in the analyzer driver: This event was only triggering initialization of some lazy fields on the driver: compilation, analysis scope, declaration analyzers and event processing task. This code has been refactored into an Initialize method which is triggered in AnalyzerDriver.Create immediately after a new compilation is created with driver's event queue. 2) Clean up ProcessCompilationCompletedAsync: Move the await of syntax tree analyzer tasks and DiagnosticQueue.Complete invocation out of this method into the primary driver task. This method now just invokes all the compilation end actions and doesn't do any post processing. I have also cleaned up the analyzer test framework a bit. (changeset 1392961)
-
由 AlekseyTs 提交于
***NO_CI*** (changeset 1392938)
-
由 manishv 提交于
1) Type argument for "TLanguageKindEnum" type param to language specific register methods (RegisterSyntaxNodeAction, RegisterCodeBlockStartAction and RegisterCodeBlockStartAction) must be VB/C# SyntaxKind enum type. 2) Provide LocalizableString arguments for title and description parameters of DiagnosticDescriptor constructor. The rule is disabled by default, but enabled for all our analyzer projects. (changeset 1392911)
-
由 AlekseyTs 提交于
***NO_CI*** (changeset 1392909)
-
由 srivatsn 提交于
These projects (henceforth referred to as CodeAnalysis analyzers) are set of analyzers for the Roslyn APIs. As a start, I'm moving the few metaanalyzers that Manish wrote to this project. We will ship these analyzers with the roslyn nuget packages. So any rules we want to impose on consumers of Roslyn should go here. (changeset 1392712)
-
由 AlekseyTs 提交于
***NO_CI*** (changeset 1392700)
-
由 AlekseyTs 提交于
- Detect numeric overflow for the conversion to the target underlying type during conversion classification. - Perform constant folding for the conversion to the target underlying type during lowering ***NO_CI*** (changeset 1392661)
-
由 AlekseyTs 提交于
Make tests passing on a non-English OS, even in presence of corresponding localized resources. In the process several product issues were fixed like: - Localized exception messages incorporated into diagnostics by command line compiler are not obeying /preferreduilang switch. - Some strings are loaded from resources at the time when diagnostic object is created. Resources are loaded earlier than they could be. When error message is requested, it might not be localized in accordance with the requested culture. - When target culture is not provided, DiagnosticInfo objects used as arguments within another diagnostic object are formatted using InvariantCulture, whereas all other arguments use current culture (as expected). Portions of the message are localized to different languages. (changeset 1392630)
-
由 manishv 提交于
-
由 TomasMatousek 提交于
ImmutableArrayExtensions should be internal - we shouldn't be exposing public extension methods on collection types. (changeset 1392421)
-
由 TomasMatousek 提交于
-
由 TomasMatousek 提交于
Encapsulate heaps and operations on them in a MetadataHeapsBuilder. Previously pieces of related functionality were scattered all over. Improvements in visualizer: for each blob on #Blobs heap display its kind (TypeSpec, MethodSignature, etc.). Calculate and display aggregate blob sizes per kind. (changeset 1392195)
-
由 shyamn 提交于
Adding a TestExtensionManager class in the VisualStudioTestSetup project that will cause any crashes encountered in the light bulb when running VS integration tests to crash VS within an exception filter as opposed to later once the exception has already been caught. I am adding this to get more actionable dumps to debug the issue reported in Bug 1098600... (changeset 1391946)
-
由 jasonmalinowski 提交于
The problem was an errant cast assumed the metadata would be a string[]. The clean fix is to use the appropriate extension method to deal with the single/multiple case that we get from the MEF library. (changeset 1391813)
-
由 Basoundr_ms 提交于
-
由 Kevin_H 提交于
-
由 manishv 提交于
Turn off the recently added Roslyn diagnostics for validating implementation of anlayzers until I clean them up for Roslyn.sln (changeset 1391678)
-
由 TomasMatousek 提交于
Static lambdas in generic methods are emitted on per-method display class. Include method ordinal into its name to make it unique. The previous change to synthesized name numbering introduced a regression - if two generic methods of the same arity contained static lambdas the resulting assembly had duplicate type names. This change addresses that case. (changeset 1391470)
-
由 Kevin_H 提交于
-
由 manishv 提交于
1) Analyzer has an expensive compilation end action: The compilation end actions registered on CompilationStartAnalysisContext can be executed only after all other actions registered on it have been executed on the entire compilation. This can hurt the typing performance when the analyzer is executed in the Visual Studio IDE. If the analysis done within your compilation end action is independent of analyses done in other actions registered on CompilationStartAnalysisContext, then consider registering this end action on AnalysisContext in Initialize method instead of registering it here. This should improve the IDE performance for your analyzer. 2) Recommend adding language support to diagnostic analyzer: If the analyzer supports just one of C#/VB languages, but the analyzer assembly doesn't reference either C# or VB CodeAnalysis assemblies, then the analyzer is pretty likely a language-agnostic analyzer and can support both languages. Consider either removing the argument to DiagnosticAnalyzerAttribute or adding a new DiagnosticAnalyzerAttribute for 'XXX' language support. 3) ReportDiagnostic invoked with an unsupported DiagnosticDescriptor: Only supported descriptors returned from DiagnosticAnalyzer.SupportedDiagnostics should be used for diagnostics reported by ReportDiagnostic. This is a common mistake when adding new rules to an existing analyzer, the diagnostic author might forget to update SupportedDiagnostics. (changeset 1391218)
-
由 TomasMatousek 提交于
Implements a new approach to generating unique synthesized member names (see also the attached email). 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 TypeCompiationState. 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 (it;'s simple named "c<>"). - 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. - Dynamic site containers - no longer include method name in the type name, instead method ordinal is used. 4) Expression compiler - rename generated type to "<>x" to avoid confusion with "<>c" static display class. 5) Avoid replacing "." with "_" in member names, other than type names. While displaying stack frames the EE extracts method name from synthesized lambdas method names and displays it. Thus we were displaying "I_F" instead of "I.F" for explicitly implemented methods. In type names replace "." with "-". Replacing with "_" lead to duplicate type names in emitted assembly (2 iterator methods with names "I_F" and "I.F" - explicitly implemented iface method). (changeset 1390962)
-
由 manishv 提交于
Add Roslyn diagnostic analyzers for validating implementation of diagnostic analyzers (meta-analyzers) 1) MissingDiagnosticAnalyzerAttributeRule: Validate that non-abstract sub-type of DiagnosticAnalyzer has DiagnosticAnalyzerAttribute applied to it. 2) MissingKindArgumentRule: Ensure that at least one symbol kind/syntax kind argument is provided to RegisterSymbolAction/RegisterSyntaxNodeAction respectively. 3) UnsupportedSymbolKindArgumentRule: Ensure that only supported symbol kinds are registered with symbol analyzer actions. 4) ApplyDiagnosticAnalyzerAttributeFix: CodeFixProvider for Rule (1) to generate DiagnosticAnalyzer attribute(s). (changeset 1390936)
-
由 dustincampbell 提交于
The vast majority of this came from ADGreen (thanks Anthony!), which in turn had a great deal ported from the work I'd done in C#. At this point, I'm not sure *who* wrote this code. It's shelvesets all the way down. * Automatic brace completion * Formatting * Completion list * Brace matching * Classification (changeset 1390884)
-
由 manishv 提交于
Also fixes bug 1097058 by removing the suppressions for now fixed RS0013. (changeset 1390773)
-
由 RoslynTeam 提交于
-
由 angocke 提交于
Disable a missed keepalive test and mark it with the same workitem to investigate keepalive test reliability (CS 1095079). (changeset 1390720)
-
由 RoslynTeam 提交于
This matches the folder mapping of the git repository and makes it easier to do mapping to Codeplex/Git. (changeset 1390665)
-
- 07 1月, 2015 5 次提交
-
-
由 AlekseyTs 提交于
***NO_CI*** (changeset 1390660)
-
由 manishv 提交于
-
由 AlekseyTs 提交于
C#: GetAndValidateConstantValue – Adjust error recovery code to avoid unintentional suppression of expected diagnostic. ***NO_CI*** (changeset 1390636)
-
由 manishv 提交于
Fix for bug 1088032: We need to move all our analyzers to use localizable strings for title and description. Update FxCop and Roslyn analyzers in Roslyn.sln to use the newly added DiagnosticDescriptor constructor that takes LocalizableString for Title, MessageFormat and Description. (changeset 1390465)
-
由 srivatsn 提交于
The renamed files from my previous somehow didn't have the edits but just had the rename checked in. Checking in the edits as well. (changeset 1390443)
-