TomasMatousek

user stats

Member SinceJuly 12, 2006
Last VisitOctober 21, 2014

Contact

coordinator for

IronRuby
MySQL Extensions for Phalanger

developer for

.NET Compiler Platform ("Roslyn")

TomasMatousek

personal statement

Developer at Microsoft.

activity stream

October 7, 2014 - .NET Compiler Platform ("Roslyn"): Posted to discussion: MetadataStreamReference?

October 7, 2014 - .NET Compiler Platform ("Roslyn"): Committed 7fa0b8fcd0e26ff8b88ce113082f675dc3b68f07, Merges MetadataReferenceProvider and MetadataReferenceResolver into a single type. Previously the user had to pass both of these objects to CompilationOptions and the compiler had to call first the resolver to resolve the path specified in #r: string ResolveReference(string reference, string baseFilePath) and then the provider to create the reference: PortableExecutableReference GetReference(string resolvedPath, MetadataReferenceProperties properties) With this change the compiler simply calls on MetadataReferenceResolver: ImmutableArray<PortableExecutableReference> ResolveReference(string reference, string baseFilePath, MetadataReferenceProperties properties) Notice that now the resolver may return multiple references. This is needed to support #r of NuGet packages. We used reference resolvers and providers in many ways for multiple purposes. I left behind the metadata file resolvers and providers to avoid making too many changes, but made them internal. In some cases the usage is legitimate, but still an implementation detail. More cleanup will also be possible once we remove the old scripting API. For now I have worked around all these dependencies. (changeset 1349333)

October 6, 2014 - .NET Compiler Platform ("Roslyn"): Committed d0ea0869c798e3829cbefe7c7bb6720b3924d4b5, Decouple Workspace metadata provider from compiler metadata provider. 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)

October 6, 2014 - .NET Compiler Platform ("Roslyn"): Committed cad06f2b5c91f8090abaea48a461d5d81554b796, Implements CR feedback for EmitOptions change: rename EmitOptions.OutputName to OutputNameOverride and adds TolerateErrors and IncludePrivateMembers. (changeset 1348868)

October 6, 2014 - .NET Compiler Platform ("Roslyn"): Committed 042bc6fb08de1e473c8206f5c9f8ecff86baa753, Fixes calls to Compilation.Emit in samples. (changeset 1348627)

October 6, 2014 - .NET Compiler Platform ("Roslyn"): Committed 1621a00f346c04d263f009ad58eba52bec713875, Introduces EmitOptions for options passed to Compilation.Emit(). 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)

October 5, 2014 - .NET Compiler Platform ("Roslyn"): Committed 0d02f66fbe11b4d7ad5d122b824336bc1a5fb94d, Rename EmitOptions in tests to TestEmitter to avoid name conflicts. (changeset 1348296)

October 5, 2014 - .NET Compiler Platform ("Roslyn"): Committed f07ac60e8e7a8649bfea9d776ceba1c2a8374447, Harden CustomDebugInfoReader. (changeset 1348242)

October 3, 2014 - .NET Compiler Platform ("Roslyn"): Committed a1c4f361eff40830b0c971257f88eccc6f60deb6, The synthesized variable used for storing the value of Select Case should be long-lived. (changeset 1348097)

October 3, 2014 - .NET Compiler Platform ("Roslyn"): Committed 916b9efafe3bc1544430388a59e4dea523f9880b, EnC: Local variable mapping rewrite. 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)

projects i'm following

forks

No forks.