- 02 10月, 2014 39 次提交
-
-
由 TomasMatousek 提交于
This shelveset implements following changes to metadata reference compiler API in order to remove duplication in the public surface and prevent users from unexpected metadata lifetime issues: 1) MetadataImageReference and MetadataFileReference overlap Currently MetadataImageReference can be constructed from a Stream. MetadataImageReference supports metadata prefetch (reading the blob into memory and close the underlying stream) as well deferred reading (no content is read until the reference is consumed during compilation). MetadataFileReference only supports deferred reading. Lifetime of MetadataFileReference is non-deterministic, the underlying file is locked until no references exist and we GC the metadata. On the other hand, it is possible to construct MetadataImageReference in such a way that allows controlling the underlying resources deterministically. Remove MetadataFileReference, use MetadataImageReference instead. 2) Lifetime management AssemblyMetadata and ModuleMetadata objects hold on resources and implement IDisposable. When using MetadataFileReference constructors and some MetadataImageReference constructors to create references the underlying metadata objects are created implicitly and the user doesn’t have a way to explicitly dispose them. Make MetadataImageReference constructors internal and instead add factory method GetReference on AssemblyMetadata/ModuleMetadata. The usage pattern is: using (var metadata = AssemblyMetadata.CreateFromXxx(…)) { var compilation = CSharpCompilation.Create(syntaxTrees, new[] { metadata.GetReference() }); … } In addition the shelveset makes MetadataImageReference internal and adds the following convenience APIs, that are not the most efficient but are very convenient, easy to discover and safe to use for customers that don’t wanna explicitly manage the lifetime of metadata objects. (changeset 1345987)
-
由 jaredpar 提交于
-
由 vladres 提交于
Fix bug 1032724: Do not give error CS0842: 'C.X': Automatically implemented properties cannot be used inside a type marked with StructLayout(LayoutKind.Explicit) for static auto-properties (changeset 1345941)
-
由 heejaechang 提交于
recent dump indicates that some MEF services are found in MEF export provider but not in the map we creates off the MEF services. I added more data to be saved in the dump to see where that mismatch happens. (changeset 1345914)
-
由 jaredpar 提交于
This change implements a new DiagnosticAnalyzer for equality which adds the following rules (VB and C#) 1. If a struct overrides Object.Equals it should implement IEquatable<T>. This avoids boxing and extra type checks in many scenarios 2. If a struct or class implements IEquatable<T> it should override Object.Equals. Without this the equality implementation is simply incomplete and will unexpectedly fail when Object.Equals There were a number of violations in the Roslyn source tree of these rules which I cleaned up as a part of this change. A couple of notes on that work - In several places Equals and GetHashCode were overridden simply to throw an exception. Rather than implement IEquatable<T> (and pay the cost of the interface JIT) I just suppressed the analysis - Hash utility class cannot be used from RoslynTaoActions because it comes from 2 different referenced DLLs. For now I just manually implemented hashshing, can use extern aliases to solve if there is a strong desire for this (changeset 1345744)
-
由 AlekseyTs 提交于
C# SymbolDisplay: Do not qualify properties and events with implemented interface name unless they were already qualified. (changeset 1345691)
-
由 stoub 提交于
Replace some empty array allocations with Roslyn.Utilities.SpecializedCollections.Empty* (changeset 1345631)
-
由 manishv 提交于
This change introduces following context objects: (a) CodeFixContext struct which is passed into CodeFixProvider.GetFixesAsync method and (b) CodeRefactoringContext struct which is passed into CodeRefactoringProvider.GetRefactoringsAsync. (changeset 1345537)
-
由 srivatsn 提交于
Creating an analyzer driver is rather complicated today - you need to create the right one for the language and you need to know to attach that to the compilation etc. In this change I'm just adding a public method called Create and hiding the constructor. Also hiding a method called GetAnalyzerDiagnostic which was just used by a test in the IDE layer. The remaining public methods on this type either are resonable or are needed for the implementation of the IDE driver. We have some ideas to write the IDE driver in a way that might not require these post preview. (changeset 1345464)
-
由 stoub 提交于
Adds a diagnostic analyzer and associated code fix provider to the Roslyn diagnostics project, for both C# and Visual Basic. The analyzer finds occurrences of zero-length array allocations and recommends replacing them with calls to Array.Empty<T>. (changeset 1345427)
-
由 heejaechang 提交于
removed previous diagnostic code and moved it more closer to MEF. issue looks like comming from MEF but not 100% sure yet. (changeset 1345394)
-
由 acasey 提交于
***NO_CI*** (changeset 1345330)
-
由 nmgafter 提交于
-
由 nmgafter 提交于
Similarly for DynamicType and PointerType. (changeset 1345275)
-
由 angocke 提交于
-
由 AlekseyTs 提交于
-
由 Basoundr_ms 提交于
Bugfix 608827 - CR (changeset 1345188)
-
由 nmgafter 提交于
-
由 manishv 提交于
Change ICodeFixProvider (interface) to CodeFixProvider (abstract type) and ICodeRefactoringProvider (interface) to CodeRefactoringProvider (abstract type) (changeset 1344836)
-
由 dustincampbell 提交于
Bug Fix #919671: Classify XML doc comment whitespace to allow users to set up Fonts and Colors to give XML doc comments a background color with no gaps. The approach taken here is to classify the whitespace trivia using the same classification type as the token it's attached to. We could introduce a new "XML doc comment whitespace" classification type, but that feels a bit over the top. (changeset 1344805)
-
由 heejaechang 提交于
-
由 ChuckStoner 提交于
-
由 heejaechang 提交于
made typescript not to crash due to diagnostic code that has put into to investigate language service race issue. (changeset 1344342)
-
由 VSadov 提交于
-
由 heejaechang 提交于
removed previous diagnostic code and added new one which most likely tell us what went wrong. (changeset 1344144)
-
由 nmgafter 提交于
-
由 tmeschter 提交于
Currently, if an AnalyzerFileReference cannot read the assembly to determine the assembly name (because the file is missing, or inaccessible, or isn't an assembly, etc.) we simply return base.Display. This is silly, as AnalyzerReference.Display simply returns null. Instead, we should simply return the file name. (changeset 1344129)
-
由 TomasMatousek 提交于
Replaces usages of NoLocationVariable with simple synthesized variable or with TypeSubstitutedLocalSymbol. Remove some unnecessary differences between implementations of LocalSymbol in VB and C#. (changeset 1344093)
-
由 kayleh 提交于
AbstractCodeGenerationService.AddMembers was using an O(n^2) algorithm to insert new members. This change allows bulk inserting members if the AutoInsertionLocation flag is false. For now, metadata as source only sets AutoInsertionLocation to false for enum symbols which can commonly have thousands of members. SeparatedSyntaxList.InsertRange was also calling Insert for each node. It now adds the nodes in a single step. (changeset 1344073)
-
由 jaredpar 提交于
The Roslyn code base was terminating on a stack overflow in places where the native compiler would issue a simple error. This is acceptable behavior for the command line compiler but troublesome for the IDE where it was causing Visual Studio to terminate on bad code. Simply pasting certain samples caused the IDE to vanish with data loss. This change uses RuntimeHelpers.EnsureSufficientStackSpace to help guard against this problem. This function will terminate with a recoverable exception if the CLR determines insufficient stack space is available for an average .Net function to execute. At the moment this function isn't available in the PCL hence reflection is needed. Once it becomes available the reflection will be removed and the hepler will be accessed directly. (changeset 1344040)
-
由 ChuckStoner 提交于
-
由 heejaechang 提交于
removed previously added diagnostic code to pin piont race in workspace. it turns out race is not in workspace but in language services. added new diagnostic code in language services and removed one in workspace. (changeset 1343621)
-
由 TomasMatousek 提交于
-
由 nmgafter 提交于
-
由 shyamn 提交于
-
由 AlekseyTs 提交于
-
由 vladres 提交于
Test for bug 1036356: Assert fails at Microsoft.CodeAnalysis.CSharp.LocalRewriter.MakeConversion for [DefaultParameterValue(DayOfWeek.Monday)] (changeset 1343368)
-
由 VSadov 提交于
The code that was supposed to prevent that situation from happening was not handling all cases. (changeset 1343365)
-
由 vladres 提交于
Test for bug 1036339: GetDiagnostics fails with NullReferenceException for optional parameter in security attribute (changeset 1343346)
-
- 27 9月, 2014 1 次提交
-
-
由 mattwar 提交于
(changeset 1343137)
-