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-07-12Enable ThreadStatic GC layout test (#6090)Michal Strehovský
This was not enabled because at the time the test was written, `IsThreadStatic` was a lie. It would have caught #6041 in a much cheaper way if we haven't forgotten to enable it when thread statics were brought up.
2018-06-24Plumbing to generate calli PInvoke stubs (#6002)Jan Kotas
Contributes to #5587
2018-03-28Use a shared DynamicInvoke for delegates and reflection (#5615)Michal Strehovský
When I did the `System.Reflection.Pointer` support for reflection invoke and delegate `DynamicInvoke`, I found these two thunks do pretty much the same thing. They got implemented separately because I was just porting Project N IL2IL code, but there's no reason why we need two. With this change, Delegate.DynamicInvoke will just call into the shared helper that is also used for reflection invoke. This is a bigger diff due to bunch of mechanical changes: * The set of generated helpers had to be moved to a place from where both delegate and reflection infrastructure can see it. A type system context dot file did the trick. (Contributes to #3873.) * The generated assembly got moved to the type system context so that the thunks can stay homed in it. * Fix to CppCodegen name mangling so that these can be still referenced in CppCodegen.
2018-03-13Fix issue where syncing to latest causes all multifile projectX builds to failDavid Wrighton
- Issue was that our algorithm for computing equivalence between the ILToc and the thing we are compiling was using a string which was supposed to be unique per type - Unfortunately, it wasn't in the case of nested types nested in other nested types - Fix is straightforward, simply use AppendName instead of AppendNameForNamespaceType for the containing type. [tfs-changeset: 1691597]
2018-03-12Update dependencies (#5528)Michal Strehovský
Includes changes necessiated by the move of Vectors to CoreLib.
2018-02-27Remove reflection in ValueType.Equals/GetHashCode (#5436)Michal Strehovský
The implementation relies on a new virtual method on `System.ValueType` that provides information about fields on a type. An override of this method is injected by the compiler when needed. This implementation is different from what Project N does (where we inject actual overrides of both methods). The CoreRT implementation is a bit more space-saving because there is only one method that does fewer things. This ends up being a 0.9% regression in size of a hello world app, but we do get some correctness with it and a potential to get the reflection stack completely out of the base hello world image (that one will be a huge win). We can get some of the regression back by: * Getting RyuJIT to generate more efficient code for the offset calculation (dotnet/coreclr#16527) * Making fewer things reflectable. We're currently generating the data for e.g. OSVERSIONINFO because it's used as a parameter in a method that is reflectable, and therefore the parameter gets boxed, and therefore it needs this data. It also drags in a fixed buffer internal type because it's a valuetype field on OSVERSIONINFO. This alone costs us 100+ bytes.
2018-02-14Typos (#5386)John Doe
* acces -> access * accesss -> access * acknowleges -> acknowledges * actitivy -> activity * Additonally -> Additionally * Activable -> Activatable * adjustting -> adjusting * Aggresive -> Aggressive * agressively -> aggressively * agressive -> aggressive * Aleady -> Already * alernate -> alternate * aligh -> align * Alloctor -> Allocator * allready -> already * Althought -> Although * Amonst -> Amongst * anthing -> anything * Anthyhing -> Anything * Aquired -> Acquired * aquire -> acquire * Architecure -> Architecture * Arthimatic -> Arithmetic * artiface -> artifact * artifical -> artificial * Arugment -> Argument * assigining -> assigning * atomicly -> atomically * auxillary -> auxiliary * avilability -> availability
2017-12-24Add algorithm to compute the MaxStack valueMichal Strehovský
This serves two purposes: - Compute MaxStack for generated IL. We were estimating the MaxStack by reporting the number of bytes of IL but this was inhibiting inlining in RyuJIT - Add code to validate stack balance for IL we generate. This lets us catch issues before they reach codegen. This should help productivity because it lets us avoid having to either build a checked RyuJIT to troubleshoot this, or debug the IL manually on paper.
2017-12-08Overhaul ToString in the type system (#5065)Michal Strehovský
This is fixing several problems with how we did `ToString`: * The existing scheme required every `TypeDesc`/`MethodDesc`/`FieldDesc` descendant to override `ToString`. Of course we were not consistent with this and as a result, most of our synthetic type system entities had non-existent representation in the debugger. Overriding is a lot of boilerplate. * We were not flexible with the stringified names. E.g. instantiated types became too long because we were module- and namespace- qualifying everything. * (Minor) The runtime type loader was shipping with ToString support in retail configuration that was largely unused. With the new scheme, besides fixing the problems above, I'm adding a bunch of conveniences: * `MethodDesc` now also have signatures in their `ToString`. * Well-known primitive types have short aliases * System.Private prefix is shortened to S.P. I tested that the `TYPE_LOADER_TRACE` still works after this. The runtime type loader overrides the `ToString` in all the places that matter.
2017-11-30Ordinal Multifile supportDavid Wrighton
- Add ordinal import mechanism to ready to run header - Add concept of various different types of export to nodes (Now nodes can be exported by symbol name or by ordinal) - Abstraction of how nodes from exported modules are imported (ImportedNodeProvider) - Import/Export table nodes (MrtProcessedImportAddressTable, MrtProcessedExportAddressTable) - Runtime decodable jump stubs - Tweaks to floating dictionary computation to behave correctly when no floating section is present, and to tolerate floating sections without version numbers - Not integrated with the open source version of the compiler, but the basic nodes and necessary infra are present Also - Allow a TypeSystemContext to specify the module in which the Canon types are logically located - Overrideable apis for the CompilerTypeSystemContext to allow customization of the set of methods logically present on Enums and Delegates - New apis on CompilationModuleGroup to allow more granular policy to be specified about what is to be compiled - Adjust GetName helper for MethodSignature to produce names that are more unique - Fix bug in floating generic dictionary implementation where it assumed that the floating section was present in all dictionaries - ARM64 indirect jump generation (with a assert to be disabled when it is debugged) [tfs-changeset: 1682436]
2017-11-12Make Canon types inherit from MetadataTypeMichal Strehovsky
Over the years, I had a "sigh, I wish Canon types were MetadataTypes" moment several times. I just had another of those. I don't actually remember why we made these inherit `DefType` instead of `MetadataType`. We can come up with the right answers to all questions a `MetadataType` needs to answer. Canon types not being `MetadataType` is also the sole reason why `RuntimeDeterminedType` can't be a `MetadataType` either. [tfs-changeset: 1680914]
2017-10-31Adding data structure support for methods on RuntimeDeterminedTypes. This is ↵Fadi Hanna
required to make certain cases of generics work in ProjectX, since the STS typesystem has representation for those, and requires them to be mirrored on the CoreRT side (for correct dependency analysis and dictionary building) [tfs-changeset: 1679775]
2017-10-18Assembly-qualify type names in repro arguments (#4754)Michal Strehovský
2017-10-12[ILVerify] Instantiate constraints of generic parameters used as ↵Samuel Arzt
instantiation (#4641) * Added test case for generic instantiation with generic constraint instantiated with generic parameter. * Implemented instantiation of generic parameter constraints in constraints check. * Changed GetInstantiatedConstraints to use ArrayBuilder instead of List. * Added recursive constraint instantiation. * Added instantiation context to be able to instantiate generic generic constraints. * Added additional tests for CheckConstraints with InstantiationContext.
2017-10-04Update IsByRefLike tests (#4671)Michal Strehovský
Rewrite the test data to IL and add an extra test for good measure. Fixes #4665.
2017-10-04Updating CLI to 2.0.0 version (#4667)Jan Kotas
2017-10-04Disable tests against https://github.com/dotnet/corert/issues/4665Jan Kotas
2017-10-04Update to BuildTools with latest RoslynJan Kotas
2017-09-21[ILVerify] Fix assigning interface with variance to object generating error ↵Samuel Arzt
(#4576) * Fixed assigning interface with variance to object generating verification error. * Added test cases for casting variant interface to object. * Removed interface check in non variant path of CanCastToClass.
2017-09-20[ILVerify] Implement Ldftn/Ldvirtftn instruction (#4497)Samuel Arzt
* Added VerifierError for ldftn/ldvirtftn of constructor. * Implemented basic ldftn and basic delegate creation functionality. * Added TestName attribute to TestCases to further shorten display name of tests. * Implemented basic ldftn functionality and constraint checks. Moved type conversions to helper class. * Added test cases for ldftn and newobj of constrained generic types. * Added test cases for ldvirtftn. Fixed display of invalid test errors. * Changed constraints checks to use ConstraintsHelper class. Added additional test cases for GenericParam as generic parameter with special constraints. * Added additional constraints check for generic parameters with special constraints. * Fixed typo in filename of TypeSystemConstraintsHelpers. * Fixed typo in 'ILDisassember'. * Slight code refactoring. Added reference to test case assert issue.
2017-08-26Add custom attribute type name formatter (#4367)Michal Strehovský
2017-08-23Fix debugger stepping into Main method (#4364)Michal Strehovský
This fixes a long standing pet peeve of mine: F11 into the `__managed_Main` method doesn't work and steps over the method instead. This adds infrastructure so that we can do `DebuggerGuidedStepThrough` on generated methods. A slight annoyance is that for UTC, the FEEFEE sequence point needs to be on a NOP that precedes the call, and that scheme doesn't work for RyuJIT. But UTC will need to fix that anyway because we won't be rewriting IL for them in the future and no-NOP is how DebuggerGuidedStepThrough methods are in C# when used from within the BCL.
2017-08-22Emit IsByRefLike flag on generic definitions (#4346)Michal Strehovský
Also took the opportunity to make the IsByRefLike flag not be a property of the field layout (but use the newly approved custom attribute that everyone else uses). Fixes #4220.
2017-07-12Overhaul exception throwing from the type systemMichal Strehovsky
Throwing an exception from the type system is a rather complicated thing because the type system is used in so many places. The basic requirements are: * The runtime type system needs to throw the runtime exceptions (System.TypeLoadException, System.BadImageFormatException, etc.). * The compile time type system needs to throw exceptions in a way that we can "serialize" the thrown exception into a chunk of code that will throw the desired exception at runtime. This is to emulate the CLR behavior you would get if you e.g. mess up your StructLayout, or feed the compiler garbage in general. * The exception message thrown or serialized from the compiler can have different languages (the localization of the compiler doesn't have to match that of the running compiled executable). With this change, all exception throwing happens through a ThrowHelper. We have two ThrowHelpers - one used by "compile time type systems" and another one used by the runtime type system. They share the logic to format the type names and exception message strings. [tfs-changeset: 1665419]
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-20Rollback the ToolsetVersion cleanup for more projectsJan Kotas
[tfs-changeset: 1662283]
2017-06-17Merge remote-tracking branch 'upstream/nmirror' into nmirror-mergeJan Kotas
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-15GVM dependency analysis performance fixes (#3872)Fadi Hanna
Refactor GVM algorithm for better performance Fix GVM resolution bug on derived types Fix bug with variance (https://github.com/dotnet/corert/issues/3454)
2017-06-06Merge pull request #3762 from shrah/runtime_dataFaizur Rahman
Generate runtime interop data for structs and delegates
2017-06-03Implement INonEmittableType for NativeStructTypeFaizur Rahman
2017-06-02Remove problematic use of NotImplementedException (#3774)David Wrighton
* Remove problematic use of NotImplementedException - Mostly convert to NotSupportedException - For IsByRefLike, implement correctly - References issues 190 and 3772 - Fixes #3760
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-27Stop using InstantiateSignature to convert RDT's to concrete types (#3710)Michal Strehovský
Calling `InstantiateSignature` on `Foo<T__Canon, !0>` should have no effect on the `T__Canon` part. I was trying to avoid duplicating code when I was porting RuntimeDeterminedTypes out of NUTC by reusing `InstantiateSignature` to also do `GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution` but we really need the duplication.
2017-05-21[ILVerify] Handling of assignment of interface to object - with ↵Gergely Kalapos
CastingHelper (#3666) * Handling interface->object assignment + test * Adapted logic in CanCastToClass and use CastingHelper.CanCastTo in IsAssignable(TypeDesc src, TypeDesc dst)
2017-05-15Finish support for rank 1 mdarrays (#3610)Michal Strehovský
Three parts: 1. Update casting logic to allow casting SzArray to rank 1 MdArray (but not the other way around) 2. Update MdArray rank 1 methods to be able to operate on SzArrays 3. Update array creation path to emulate the behavior where allocating rank 1 MdArray with 0 lower bounds actually gives you an SzArray Third bullet point makes this the most annoying, because we can't reliably support `newobj instance void int32[0...]::.ctor(int32)` without hitting the type loader. I was also considering adding an optional field on Rank 1 MdArrays that lets you get to the SzArray's EEType from it. It might be better. Fixes #3331.
2017-05-11Treat the `<Module>` type as not having a lazy constructor (#3584)Michal Strehovský
This was special cased in CorInfoImpl because that's where CoreCLR special cases it, but the entire system should consider these not having a lazy cctor. This cctor is triggered differently. Noticed while working on the IL scanner. Also made this check faster while I was at it.
2017-05-10Add support for generating type level layout information from ↵David Wrighton
RuntimeDeterminedTypes - Add RuntimeDeterminedFieldLayoutAlgorithm type - Expose ValueTypeShapeCharacteristics directly from DefType instead of just representing the various flags - Adjust compiler type system context to support usage of RuntimeDeterminedFieldLayoutAlgorithm [tfs-changeset: 1657930]
2017-04-22Move two mis-filed Mangling dot files (#3406)Simon Nattress
Move two name mangling dot files under the Common folder Add a regression test for the NativeStructType naming
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-12Add support for sorting MethodDescs (#3305)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-11Add support for sorting in the type system (#3258)Michal Strehovský
2017-04-08Correctly mangle names of NativeStructTypes (#3257)Simon Nattress
Use the new IPrefixMangledType interface to disambiguate structs with the same name from different input assemblies.
2017-04-07Add mangled names for delegate and struct marshallingFaizur Rahman
Michal added concept of prefix mangled type/method couple of days ago which enables us to add managled name for delegate and struct marshalling stubs.
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-30Fix build break from string interningMorgan Brown
[tfs-changeset: 1652530]
2017-03-30NS2.0 Add String.Intern (#3149)Atsushi Kanamori
This won't cover literals but otherwise, gets the job done. Note that LockFreeReaderHashTable was declared public (and so were a ton of classes that derived from it, so I couldn't just make it private.) Including it in CoreLib.dll means no one above CoreLib can include it - they'll just the public one from CoreLib.dll.
2017-03-23Implement TypedReference in CoreRT (#3000)Michal Strehovský
This is basically three things: 1. `ByReference<T>` support 2. General support infra in the type system for Byref-like types (to be reused for e.g. `Span<T>`). 3. TypedReference Fixes #367.