- 07 10月, 2014 13 次提交
-
-
由 jasonmalinowski 提交于
This change splits the Workspaces layer into two parts, mirroring the Portable/Desktop split that the compilers did. The core parts of the Workspaces layer (managing documents and projects, formatting, some refactoring, code fixes) is kept in the portable subset, with a few non-portable pieces remaining, notably MSBuild support. This change has a major impact on how MEF now works in Roslyn. Traditional MEF (“MEFv1”) is not portable, and so we must move the Workspaces layer over to using the Microsoft.Composition NuGet package (“MEFv2”) which is. The APIs are distinct in that each has its own namespace, but the concepts are more or less identical. It requires some care though: the workspaces layer is simple in that it only references MEFv2, but higher layers have to reference both versions to use metadata attributes. Exports using metadata attributes from the editor (say, ContentTypeAttribute) must use MEFv1 attributes to export, whereas exports for the workspaces layer must use MEFv2 attributes. The rule is subtle and yet simple, and so a diagnostic is provided which catches any offenses to prevent confusion. This also has some impact in how we create MEF hosts: if you wish to host just the base workspaces layer, we can use MEFv2 to compose everything. The HostServices implementation (MefV1HostServices) that consumes a MEFv1 ExportProvider. If you’re in Visual Studio, you can use this implementation to get the full set of host services provided in Visual Studio. Otherwise, most of the changes in here are minor: we react to some APIs that have been moved/renamed in the portable subset we are targeting, and also align our various exception helper utilities with the compiler’s precedent. (changeset 1349276)
-
由 TomasMatousek 提交于
The service no longer derives directly from MetadataReferenceProvider. Instead the service exposes API to get metadata references and an instance of compiler reference provider. (changeset 1349108)
-
由 heejaechang 提交于
-
由 acasey 提交于
-
由 vladres 提交于
Fix bug 990618: Fix spelling of SyntaxKind.BeginCDataToken from "<[CDATA[" to "<![CDATA[". Also fix broken link in VisualBasicSyntaxGenerator.vbproj, removes some redundant code and fixes casing in some VB identifiers. (changeset 1348971)
-
由 TomasMatousek 提交于
Implements CR feedback for EmitOptions change: rename EmitOptions.OutputName to OutputNameOverride and adds TolerateErrors and IncludePrivateMembers. (changeset 1348868)
-
由 nmgafter 提交于
We insert a null check into the code generated for a delegate conversion, so that Nothing is converted to Nothing rather that throwing a null exception. Note that we continue to generate the incorrect null-throwing code for conversions appearing in expression trees. We do that because we don't want to break backward compatibility (there is no way to translate into the null-check version). (changeset 1348760)
-
由 jmarolf 提交于
Fixing file IO race condition by always removing test files in-between compilations. (changeset 1348724)
-
由 VSadov 提交于
-
由 chandera 提交于
-
由 manishv 提交于
Diagnostic.Severity property used to denote different things for compiler and user diagnostics. For compiler diagnostics, this property denotes the error code severity, i.e. the default severity of the diagnostic. For warnings as errors, this property still returned DiagnosticSeverity.Warning and the consumer had to check for the IsWarnAsError property to get the effective severity. For user diagnostics, this property denotes the effective severity based on the compilation options. This change makes the following changes: 1) Change Diagnostic.Severity to always represent the effective severity of the diagnostic for both user and compiler diagnostics. So for warn as error, this will return error severity. 2) Introduce Diagnostic.DefaultSeverity to represent the default severity of the diagnostic. This is the error code severity for compiler diagnostics and diagnostic descriptor severity for user diagnostics. 3) Change IsWarningAsError property to return true iff Diagnostic.DefaultSeverity = Warning and Diagnostic.Severity = Error. (changeset 1348667)
-
由 TomasMatousek 提交于
-
由 TomasMatousek 提交于
Moves options that were previously on CompilationOptions but were not used until emit phase to EmitOptions: fileAlignment, baseAddress, highEntropyVirtualAddressSpace, subsystemVersion, runtimeMetadataVersion. They hold on values written to various PE headers. We can now easily add other similar PE flags to EmitOptions, which is a common customer request, without affecting code that works with compilation options in other layers (workspaces, project system, etc.). Removes EmitMeadataOnly method and instead adds a MetadataOnly flag to EmitOptions. Removes MetadataOnlyEmitOptions - they were not used and can now be easily added as bools to EmitOptions. Moves pdbFilePath and outputName from parameters of Emit to EmitOptions. IDE: remove tracking of options that were moved to EmitOptions, since the IDE doesn't care about options that don't affect compilation. (changeset 1348623)
-
- 06 10月, 2014 7 次提交
-
-
由 ADGreen 提交于
Renamed the event and property accessor blocks to be consistent with each other and the accessor statements they parent. (changeset 1348603)
-
由 ADGreen 提交于
Refactors the DoLoopBlockSyntax kinds to be more useful to consumers. Specifically rather than merely identifying whether the loop has a top condition, bottom condition , or no condition, and requiring in the former two cases the caller to inspect the WhileOrUntilClause to determine how to interpret the condition this kind of the block now reflects this and which of the five forms a Do loop may take in VB. This is consistent with the pattern we use for MethodBlocks which have kinds aligned with the kinds of their method statements which are themselves aligned with the method keyword (i.e. Sub or Function). (changeset 1348593)
-
由 ADGreen 提交于
Abbreviates the public VB-specific types (e.g. VisualBasicSyntaxTree -> VBSyntaxTree) in accordance with the .NET Class Library Guidelines to avoid overly lengthy names and consistent with the conventions used in other APIs (e.g. VB CodeDom). (changeset 1348499)
-
由 ADGreen 提交于
* Merged VB's NamedArgumentSyntax into SimpleArgumentSyntax, adding a new optional leading NameColonEqualsSyntax node. (changeset 1348463)
-
由 TomasMatousek 提交于
-
由 ADGreen 提交于
Makes the VB and C# Syntax APIs more consistent in their representation of Imports/using statements. * Folds AliasImportsClause and MembersImportsClause into a new SimpleImportsClause with an optional ImportAliasClause. (changeset 1348278)
-
由 TomasMatousek 提交于
-
- 05 10月, 2014 3 次提交
-
-
由 ADGreen 提交于
I split out C# 'await' expressions into their own SyntaxNode type consistent with their representation in the VB syntax tree. Previously 'await' expressions were represented as a kind of PrefixUnaryExpressionSyntax. (changeset 1348213)
-
由 ADGreen 提交于
-
由 ADGreen 提交于
Simply the VB syntax trees for single- and multi-line Ifs and Try blocks, making them consistent with the VB language spec. Now, instead of being parented by an intermediate "If Part" or "Try Part" the header statements and the body statements are directly parented by the block (similar to how we represent them in C#). (changeset 1348193)
-
- 04 10月, 2014 16 次提交
-
-
由 heejaechang 提交于
wait up to 5 seconds on VS shutdown to give grace period to shutdown solution cralwer. otherwise, some async method of solution cralwer might in the middle of running even after shutdown process started. (changeset 1348118)
-
由 Kevin_H 提交于
Rollback change that added a reference to the Compilation on CompilationTestData. I misunderstood the root cause of the issue that caused a test to AV when visualizing IL. (changeset 1348099)
-
由 TomasMatousek 提交于
The synthesized variable used for storing the value of Select Case should be long-lived. (changeset 1348097)
-
由 dpoeschl 提交于
Bugfix 991528 "[CodePlex] Persisting Documents with MSBuildWorkspace.TryApplyChanges doesn't respect existing encoding" Pass the CodePage MSBuild property to our MSBuildWorkspace instead of defaulting to the system default encoding. If the CodePage is 0 or missing, we default to UTF8. Bugfix 1038018 "Inline rename causes unrelated edits in files with unicode characters" The TextBufferTextFactory now prefers encodings in the following order: - UTF8/Unicode/BigEndianUnicode if the byte order mark is present - The specified default codepage/encoding in the project file - UTF8 without a byte order mark - The system default encoding (changeset 1348078)
-
由 TomasMatousek 提交于
Current approach and issues When emitting method body of a method updated during EnC the compiler needs to assign local variables the same slots they had before the edit, so that state stored in those locals gets preserved. To implement this slot mapping we used to encode information into synthesized variable names that identified the syntax node that produced the variable and ultimately allowed us to calculate the slot mapping. For user variables we identified the slot by name. In both cases we relied on an assumption that the compiler assigns slots in syntax order. This assumption is false in some cases. We could make it true but the requirement would be fragile and hard to enforce when new features are implemented in the compiler since the entire lowering pipeline would need to preserve the assumption. New approach In the new approach we calculate a "syntax offset" for each user-defined and long-lived synthesized variable. Every such variable symbol has to be associated with a syntax node (its declarator). In usual cases this is the textual distance of the declarator from the start of the method body. It gets a bit complicated when the containing method body is not contiguous (constructors). If the variable is in the body of the constructor the definition of syntax offset is the same. If the variable is defined in a constructor initializer or in a member initializer (this is only possible when declaration expressions or closures in primary constructors are involved) then the distance is a negative sum of the widths of all the initializers that succeed the declarator of the variable in the emitted constructor body plus the relative offset of the declarator from the start of the containing initializer. If a single node is a declarator for multiple variables of the same synthesized kind (it can only happen for synthesized variables) we calculate additional number "ordinal" for such variable. We assign the ordinals to the synthesized variables with the same kind and syntax offset in the order as they appear in the lowered bound tree. It is important that a valid EnC edit can't change the ordinal of a synthesized variable. If it could it would need to be assigned a different kind or associated with a different declarator node. To support EnC of async method we will assign another number "subordinal" to certain synthesized locals (produced by spilling by-ref variables) to simplify the mapping. Assigning of such number is not yet implemented in this change. Together (syntax offset, ordinal, subordinal) form a LocalDebugId of a variable. Since this id needs to be stored in PDB for both user-defined and long-lived synthesized variables we can’t encode it in the name of the variable (the names of user-defined variables have to be their user specified names). Therefore this change introduces a new custom debug info record that is associated with a method. The record encodes the kind and id for each local slot of the method. As a consequence we no longer emit names for synthesized long-lived variables (“CS$...”) unless it’s necessary for backward comp with Dev12 EE (only display class local names need to be emitted for this reason). (changeset 1348066)
-
由 RoslynTeam 提交于
Add a Culture property to AnalyzerOptions so that analyzers can localize diagnostics. (changeset 1347954)
-
由 mattwar 提交于
-
由 vladres 提交于
Fix bug 1040171: ETA crashes if labeled statement is used as an embedded statement. Also simplifies some conditions using null-propagating operator. (changeset 1347929)
-
由 heejaechang 提交于
removed diagnostic code I had put into workspace to figure out MEF issues. it is no longer needed. no fix yet though. (changeset 1347829)
-
由 Basoundr_ms 提交于
-
由 Kevin_H 提交于
Add a reference in CompilationTestData to hold on to the Compilation that was used to initialize it. The IL visualizer requires Symbols of the Compilation to still be alive when visualizing tokens. Most of the time, we hold a reference to the compilation in the test method, so the lifetime of the Symbols would be long enough for all test verification to occur. However, in some tests, the Compilation is created in a helper and then thrown away as soon as the PE image is emitted. Verification steps later in the test method could result in AVs if a GC occurs at the wrong time. (changeset 1347747)
-
由 jmarolf 提交于
-
由 Basoundr_ms 提交于
Bugfix 1036954 : Compiler only expects IOException and BadImageFormatException coming out of PortableExecutableReference.GetMetadata. Any other exception (like UnauthorizedAccessException) needs to be wrapped into IOException, unless it already derives from IOException. VisualStudioMetadataReferenceManager.GetStorageInfoFromTemporaryStorage directly calls File.Open which may throw all sorts of exceptions. The fix is to call FileUtilities.OpenStream which wraps the exceptions properly Since this is behavior expected any where in the product, the APIs Open, Create have now been wrapped with the helpers to generate the IOException instead of some random exception. (changeset 1347659)
-
由 AlekseyTs 提交于
C#: Changing BaseListSyntax to contain a list of BaseTypeSyntax nodes rather than a list of TypeSyntax nodes. (changeset 1347630)
-
由 RoslynTeam 提交于
I am adding telemetry to Roslyn to collect information regarding analyzers which crash. This is to get answers for questions like - What are the top 10 analyzers which crash the most often in a VS Session? - What exceptions do they crash with? - What kind (symbol, syntaxtree) of analyzers crash often? DiagnosticAnalyzerDriver.cs - Log the analyzer and the exception details when there is a crash. DiagnosticAnalyzerLogger.cs - Logic to aggregate the analyzers crash details and post the summary as telemetry event. SolutionCrawlerLogger.cs - Log the analyzer crash summary during shutdown. HashAlgorithms.cs - Some style cop changes. (changeset 1347620)
-
由 manishv 提交于
This change replaces the uses of this API with use of speculative semantic model to determine if invoking a different constructor (given type or its base type), possibly with a subset of arguments, binds to an accesible constructor. Additionally, I have removed this public API from SemanticModel. Note: There are still language specific internal implementations of this API. These seem to be only used by tests, but some tests use them as helpers to test actual overload resolution functionality. I'll open a separate bug on compiler team to clean this up post-preview. (changeset 1347617)
-
- 03 10月, 2014 1 次提交
-
-
由 Kevin_H 提交于
Update EE to handle EnC updates (add/remove locals) by flowing the method version through to ISymUnmanagedReader.GetMethodByVersion. (fixes #1017468 & #1030053) ***NO_CI*** (changeset 1347348)
-