Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-14Preliminary Interpreter Support (#6182)Toni Solarin-Sodara
2018-07-18Refactoring the ISortableSymbolNode into ISortableNode and ISymbolNode, to ↵Fadi Hanna
separate the sorting APIs into their own interfaces, independent of having symbols. Reasons: 1) There are some dependency nodes that need sorting, and are not necessarily symbol nodes (today they implement the SortableDependencyNode, which now with these changes will also implement the ISortableNode interface) 2) Avoid places where we have the messy 2 ClassCode and 2 CompareToImpl implementations, where one pair tail-calls the other (really the main reason behind this refactoring) With these changes, the ClassCode and CompareToImpl are now part of the ISortableNode, The ISortableSymbolNode is now simply a merging of ISortableNode and ISymbolNode, to be used in places where we deal with both concepts. SortableDependencyNode provides default/abstract virtuals to the interface methods, and are overridden in derived classes. [tfs-changeset: 1707646]
2018-06-24Plumbing to generate calli PInvoke stubs (#6002)Jan Kotas
Contributes to #5587
2018-03-16[Linux] Implement generation dwarf debuginfo for types and vars (#5542)Konstantin Baladurin
* [Linux] Implement generation dwarf debuginfo for types and vars * Fix license headers * Objwriter: fixes for old objwriter package - Ignore exceptions in GetPrimitiveTypeIndex and EmitEHClause methods - Call EmitDebugVarInfo only for Windows - Don't call GetMethodFunctionIdTypeIndex in EmitDebugFunctionInfo
2018-03-02Sealed VTables implementation for CoreRT/ProjectX (tested on both). Changes ↵Fadi Hanna
include: 1) New node type for the sealed vtables 2) Logic in EETypeNode to emit the proper sealed vtable related bits, and not emit sealed newslot methods in the regular vtable 3) Changes in the algorithm that computes the virtual method slot to handle sealed vtable entries 4) Avoid creation of interface dispatch maps for special array types (mdarrays and arrays of pointers) Current size gains we get with the shared library is about 3% for amd64 ret on ProjectX. Average app size reduction is about 5% [tfs-changeset: 1690448]
2018-01-17Fix build breaks for shared CoreLib updateJan Kotas
- Add missing resources - Add temporary workaround for the moved type
2017-12-01Drive devirtualization using scanner's resultsMichal Strehovský
2017-11-16Implement efficient/correct Comparer.get_Default and ↵Michal Strehovský
EqualityComparer.get_Default (#4935) This work has several parts that largely hook up into the existing infrastructure in the class library we built for Project N. 1. Generate specialized method bodies for Comparer.Create and EqualityComparer.Create that create the right comparer specialized for the given T (if T implement the interface, doesn't implement the interface, is nullable, or is an enum) 2. If specialization is not possible at compile time, fall back to using template type loader to load the right type. 3. Add code that ensures appropriate templates get generated. This is a bit of a divergence from what Project N does because there we don't track precisely what we need and rely on universal shared code to fill in the blanks. 4. Enable RyuJIT optimization around EqualityComparer.get_Default that lets us devirtualize subsequent calls on the result of the intrinsic.
2017-10-30Stabilize object file images (#4818)Simon Nattress
* Determinism test harness Add a /determinism mode to runtest.cmd that will invoke ILC twice with different random determinism seeds. This causes graph expansion to be randomized based on seed (though deterministic for a given seed). * Add Utf8String.CompareTo Implementation taken from S.P.CoreLib. All the loop unrolling optimizations were excluded; we re-implement them if this function becomes a perf bottleneck. * Define the mechanisms for determinism To ensure deterministic output, all nodes that are emitted to the binary are sorted after compilation when retrieving the final marked nodes list. The overall approach is to sort nodes of the same type together (ie, all EETypeNodes come before NonGcStaticsNodes). Within nodes of the same type, a comparison function uses a CompilerComparer to compare the key identifying data of a node. For example, an EETypeNode is defined by a TypeDesc. The CompilerComparer provides a stable comparison function for comparing various type system primitives. Some nodes need to be emitted in an early and specific order for compiler correctness; this is provided by partitioning all sorted nodes into two phases: the first phase containined specifically ordered nodes, and a second phase for all other nodes whose ordering in the output binary doesn't matter. Add SortableDependencyNode abstract class which provides the sortability layer on top of a DependencyNodeCore. Both ObjectNode and EmbeddedObjectNode derive from SortableDependencyNode to provide sortability across all nodes that are emitted to the output binary. Introduce `ISortableSymbolNode` to provide sortability for nodes that are currently referred to in the compiler via the ISymbolNode interface. Such nodes are actually `ObjectNode` or `EmbeddedObjectNode` instances that we've lost type information for. Instances that implement `ISortableSymbolNode` redirect to the matching SortableDependencyNode methods. Add `EmbeddedDataContainerNode` as a base class of `ArrayOfEmbeddedDataNode` to allow comparison of different instantiations. Refactor the interface dispatch map index calculation so it's done when the dispatch map is emitted at the end of compilation. Previously it was done when the indirection cell in the dispatch map array got marked. This mechanism is incompatible with generating stable dispatch map indices. The arrays of embedded nodes now stabilize IDs as they emit their final data. This introduces an output ordering dependency - OptionalEETypeNodes must be emitted after the dispatch map since they encode dispatch map indices. Manually enforce this with C++ code generation, since it doesn't emit the real dispatch map structure and builds its own. Modify InterfaceDispatchMapNode to use the type name in name mangling instead of an index into the dispatch map table. Modify ObjectDumper to also amit a sha256 hash of each node's data. This dump is used to diff the map files and prove determinism. * Fill out ordering functions for all nodes Most of these are not very interesting. Here's the overall approach: - Every different type of node needs a unique ClassCode. These were generated using Math.Random. - The various metadata / native layout nodes plus arrays of EmbeddedObjectNodes get placed in the Ordered phase with specific ordering of each. - All other nodes go in the Unordered phase - To order nodes of the same type, the data that represents the key for the node in NodeFactory is compared. Ie, for an EEType, that would be its defining TypeDesc, whereas a FrozenStringNode is defined by the string it represents). - The marked nodes list also contains raw DependencyNodeCore<T> nodes, which aren't emitted. Those are all shuffled after the emitted nodes and not sorted amongst themselves. That hasn't proven to be a problem with determinism and saves a bunch of hopefully unnecessary comparisons.
2017-10-27dd IsDotNetFrameworkProductAssembly for Framework Assemblylouluqun
With Project file cotains Property <IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly>, the final assembly will contain assembly attribute [assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
2017-10-18Fix build break with latest VS preview (#4748)Jan Kotas
2017-09-26[tfs-changeset: 1676255]dotnet-bot
2017-08-31Fix type loader handling of __Canon in CoreRTMichal Strehovsky
On Project N, `__Canon` is backed by an actual type in System.Private.CoreLib. In the new type system, we no longer need each type to have a token and we chose `__Canon` to be a synthetic type created out of thin air. This poses a small problem when trying to refer to it from C#. In this change: * I'm making us not include `__Canon.cs` on CoreRT anymore. * I'm updating the single method mode command line parser to parse `__Canon` specially. We were already special casing it by rewriting the type tree anyway (parse as an ECMA type and then replace). (This is what Project X uses in the bridging code too.) * I'm making `GetCanonType` an intrinsic (which has access to the `__Canon` TypeDesc) * Putting some code under ifdef that doesn't apply on CoreRT [tfs-changeset: 1672488]
2017-07-27Inline generic dictionary lookup (#4121)Michal Strehovský
Avoid R2R helper calls in most of the generic dictionary lookups. I'm deliberately not enabling this for: * Generic lookups for static bases (these are more complicated as there might be `.cctor` triggering involved - needs RyuJIT changes) * Generic lookups for delegate creation (this is also pretty complicated - needs RyuJIT changes)
2017-07-26Typo (#4228)github-john-doe
2017-07-08Fix build breaksJan Kotas
2017-06-24Update CoreRT build to use latest .NET CLI and build tools (#3916)Jan Kotas
- Pick up latest .NET Core 2.0 CLI and buildtools - Remove all project.json references and convert everything to msbuild projects - Stick to vanilla .NET CLI project shape as much as possible. Minimize dependencies on buildtools special behaviors
2017-06-22Add more informative logs for arm (#3949)Petr Bred
Signed-off-by: Petr Bred <bredpetr@gmail.com>
2017-06-20Undo ToolsVersion cleanup on full framework projectsJan Kotas
VS is trying to "upgrate" the full framework projects without ToolsVersion [tfs-changeset: 1662259]
2017-06-17Delete ToolsVersion attribute from msbuild filesJan Kotas
The latest project templates do not have it, and it is only good for generating warnings like the following in the detailed build log: Project file contains ToolsVersion="4.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="14.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424. [tfs-changeset: 1662024]
2017-06-13Enable inlining of virtual method calls (#3773)Michal Strehovský
2017-06-01Report SIMD intrinsics to RyuJIT (#3678)Michal Strehovský
* Implement `isInSIMDModule` * Implement `appendClassName` * Implement a type name formatter that roughly approximates typestring.cpp in the CLR. Should be enough for the purposes of recognizing SIMD intrinsics. Hopefully, we won't ever have to be complete. This is the formatter used by reflection - the rules are complex and long. * Implement custom type layout for `Vector<T>`
2017-05-20RefactoringAndrew Au
[tfs-changeset: 1658966]
2017-05-03Add ExactCallableAddress/CanonicalEntrypoint helpers to NodeFactory (#3465)Michal Strehovský
Removes a bit of boilerplate. This is an API @davidwrighton suggested some time ago. This was blocked until #3423 got implemented.
2017-04-29Enhance debugging support for existing .NET Native managed debuggerDavid Wrighton
- Change eetype node name to end with ::`vftable' to improve debuggability in windbg - Change node name of statics nodes to be composed from mangled type name + a suffix. This makes it possible to find these statics blocks through msdia api surface. Will need work with debugger symbol generation to provide individual static field lookup - Send debugger events on module load for TypeManager based modules [tfs-changeset: 1656557]
2017-04-26Centralize build defines (#3431)Michal Strehovský
The way we were setting common defines (such as `AMD64`, `BIT64`, `ARM`) was extremely fragile and invited partial fixes such as #3414 and #3424. This really needs to be centralized.
2017-04-25Delete special casing around fat function pointers (#3423)Michal Strehovský
Now that we have `ISymbolDefinitionNode` in addition to `ISymbolNode`, we don't need to special case anymore.
2017-04-14Add marshalling support for returning function pointers from native side as ↵Faizur Rahman
Delegates
2017-04-14Add support for sorting FieldDescs (#3329)Michal Strehovský
Follows the same divide and conquer pattern as the code to sort TypeDescs (#3258 - compare between classes using `ClassCode` and have the classes handle comparions within the class).
2017-04-12Make DelegateCtor R2R helper perform virtual resolution (#2928)Michal Strehovský
Update the compiler to be able to leverage the newly added RyuJIT capabilities around delegate constructions. In the past, RyuJIT would only ask for the construction helper for the simplest cases (target method is not virtual, and no generic runtime lookup is needed). It would call the actual constructor method for everything else. With updated RyuJIT, we can now use the helper in all cases (if the construction pattern is verifiable). The change is bigger than I would like because: * We needed to update `DelegateCreationInfo` to capture the fact that the target of the delegate can now be runtime determined * There was an unimplemented feature around fat function pointers looked up from dictionaries (we couldn't express that the fat function pointer should point to the unboxing stub). * `ShadowConcreteMethod` didn't work great with unboxing stubs. I just made a new node that is a "shadow unboxing stub". * We needed to update both generic and nongeneric ready to run helpers to deal with the new delegate creation patterns. * JitInterface change. * Tests
2017-04-01Add concept of "prefix mangled type/method" (#3173)Michal Strehovský
* Add concept of "prefix mangled type/method" For type system entities (method/types) that are generated by the compiler, we don't have a good way to guarantee a unique mangled name. In the ECMA-based world, we rely on enumerating everything in the assembly to generate a guaranteed non-conflicting name. On the compiler-generated side, we don't have a good way to do such enumeration because there's no central database of those things. We were using multiple techniques to guarantee nonconflicting names: 1. Counter (problematic for stability when we go multithreaded) 2. Wrapping in a custom node type with special rules (extra code) 3. Getting a mangled name to use as type system name (in delegate marshalling - kind of odd thing to do) 4. Hoping that two types names just won't conflict (I think there are such patterns still remaining in struct marshalling) I was in a place where I started inventing method 5 (for `MethodBase.GetCurrentMethod` intrinsic expansion). What we really want in all those places is just to say: "use the mangled name of something we know we can generate a nonconflicting name for, and append some prefix". This change adds just that, and switches 1 and 2 from the above list to the new plan.
2017-03-30ByValArray MarshallerFaizur Rahman
Marsahal fixed size arrays, ansi string, and unicode string.
2017-03-21User defined types draft for CodeView. (#2922)Sergey Andreenko
User Defined Types for CodeView. Enum, Class, Struct.
2017-03-17Fix build breaksJan Kotas
2017-03-17Experimental prototype of jit for CoreRTDavid Wrighton
- Refactorings and tweaks of various ILCompiler infrastructure to allow use within the runtime - Refactor delegate creation info off of CompilerTypeSystemContext onto TypeSystemContext - Tweak jit interface to always refer to nodes via interfaces instead of concrete types - adjust CorInfoImpl.constructStringLiteral to respect the RepresentsIndirectionCell flag - Initial copy of JitCodeManager. Currently only supports Windows. - System.Private.Jit - Uses infrastructure from the ILCompiler such as the CorInfoImpl, jitinterface, and the dependency node infrastructure to define a way to express newly generated code and its dependencies. - Where relocs from jitted code depend on resolving to other components, they are always indirected through an indirection cell, and the final value is computed by the dynamic type loader GenericDictionaryCell system (which is poorly named, and is actually a general purpose runtime component resolution system.) - New concept of dynamic MethodEntrypoints in the type loader. This is used to bridge to the jit where necessary - The various bits of build time goo to produce experimental versions of System.Private.Reflection.Core, System.Private.Reflection.Execution, and System.Private.TypeLoader which contain the ECMA based type loader, and support the jit. - The new behavior is only enabled for these new experimental builds. - As the existing ECMA 335 based typeloader/reflection logic hasn't been enabled for building, there are fixes to make it work again [tfs-changeset: 1651156]