summaryrefslogtreecommitdiff
path: root/src/vm/mscorlib.h
AgeCommit message (Collapse)AuthorFilesLines
2019-04-13Delete unused AssemblyName._hashForControl and related code (#23972)Jan Kotas1-2/+0
2019-04-11Contextual reflection (#23740)Steve MacLean1-0/+10
* Add ContextualReflection APIs Add ContextualReflection APIs approved in dotnet/corefx#36236 Fix issue #22213 * SetParentAssembly even when IsCollectible() * ContextualReflection tests * PR Feedback * Add more usage tests Add using statement tests Add bad usage tests including Assert.Throws<> * Only initialize on set * Add XML API comments * Unify VerifyIsolation * Fix unused expectedAssembly * Remove ContextualReflectionScope throw * Clean up TestResolveMissingAssembly et. al * Remove unused QCall::AppDomainHandle * Remove AppDomainBaseObject * Pass AssemblyLoadContext as managed object to native * Fix AssemblyLoadContextBaseObject packing * AssemblyLoadContext backing stores Use explicit backing stores for events and properties * Remove StaticAsyncLocalCurrentContextualReflectionContext * Remove PermissionSetObject
2019-04-10Move AssemblyName to shared (#23737)Egor Bogatov1-1/+1
2019-03-22Fix WinRT marshalling for NotifyPropertyChangedEventArgs and ↵Jeremy Koritzinsky1-2/+2
NotifyCollectionChangedEventArgs (CoreCLR side) (#23401) * Enable marshalling IntPtr and UIntPtr in WinRT scenarios to support our marshalling infrastructure. * Enable getting an RCW for a native COM object while ignoring WinRT projections. * Rename to Marshal.GetUniqueObjectForIUnknownWithoutUnboxing * Clean up contract. * Move GetUniqueObjectForIUnknownWithoutUnboxing to WindowsRuntimeMarshal. * Move WinRT-specific FCalls to WindowsRuntimeMarshal.
2019-03-22Move Exception to shared partition (#23361)Marek Safar1-2/+0
* Move Exception to shared partition * Remove class name caching * Not useful comments removal
2019-03-18Add Utf8String skeleton (#23209)Levi Broderick1-0/+15
Utf8String is an experimental type that is string-like (heap-allocated, immutable, variable-length, null-terminated) but whose inner representation is UTF-8, not UTF-16. This is a skeleton implementation of the basic API shape. The ecosystem of APIs has not yet been built around it. All Utf8String-related code is currently surrounded by ifdefs to allow easy identification and removal from release branches.
2019-03-17Make more types eligible for vectorized code paths in MemoryExtensions (#20855)Levi Broderick1-0/+3
Types like sbyte, ushort, and other 8-bit / 16-bit elemental types are now directed down the fast vectorized code paths that previously only byte and char were eligible for.
2019-03-04Remove loose dependency in runtime on System.ComponentModel. (#23010)Aaron Robinson1-1/+5
Remove loose dependency in runtime on System.ComponentModel. Disable test to sync with CoreFX
2019-03-01Implement Serialization GuardMorgan Brown1-1/+1
Add Serialization Guard API and consume it in CoreLib targets
2019-02-27Address PR feedback (clean up style in Thread.CoreCLR.cs)Stephen Toub1-5/+5
2019-02-26Merge pull request #22841 from ↵John Salem1-0/+1
josalem/stacktrace-cache-unloading-20179-prechange Adds collection of `Assembly` objects while walking the stack in `DebugStackTrace::GetStackFrameInternal` * new field in `StackFrameHelper` in both managed and native (plus mscorlib macro definition) * retrieved via `methodDesc->GetAssembly()->GetDomainAssembly()->GetExposedAssemblyObject()` Calls `GetSourceLineInfo` with delegate signature that *does not* consume an `Assembly`. As a result, this there will be a follow up change to call the updated version after it exists in CoreFX. #20179
2019-02-22Mirror StackFrameHelperChanges in mscorlib.h and change allocation type to ↵John Salem1-0/+1
more generic g_pObjectClass
2019-02-14Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo ↵David Wrighton1-0/+19
(#22285) * GCHeapHash - Hashtable implementation for runtime use - Implementation written in C++ - Data storage in managed heap memory - Based on SHash design, but using managed memory CrossLoaderAllocatorHash - Hash for c++ Pointer to C++ pointer where the lifetimes are controlled by different loader allocators - Support for add/remove/visit all entries of 1 key/visit all entries/ remove all entries of 1 key - Supports holding data which is unmanaged, but data items themselves can be of any size (key/value are templated types) * Swap MethodDescBackpatchInfo to use the CrossLoaderAllocatorHash * The MethodDescBackpatchCrst needs to be around an allocation - Adjust the Crst so that it can safely be used around code which allocates - Required moving its use out from within the EESuspend logic used in rejit
2019-02-14Remove unnecessary fields from WaitHandle (#22593)Filip Navara1-2/+0
* Remove unnecessary fields from WaitHandle * Drop volatile from _waitHandle * Address race condition in unmanaged code * Remove unused hasThreadAffinity parameters * Fix FCDECL argument counts
2019-02-13Replace Win32Native.cs with Interop files (#22540)Stephen Toub1-4/+1
* Replace Win32Native.cs with Interop files - Replace Win32Native usage with existing Interop.* calls where they already existed - Moved Win32Native.* to their own files otherwise, and changed call sites - Left a stub Win32Native in place to handle some emitted IL from the runtime. The current infrastructure doesn't support targeting nested types, like Interop.Kernel32, and fixing that would be more involved. * Remove Win32Native.cs Replace emitted calls with ones to Marshal. * Fix incorrectly changed field * Fix Kernel32 -> Ole32
2019-02-04Move SynchronizationContext to shared partition (#22389)Marek Safar1-1/+1
* Move SynchronizationContext to shared partition * Move WaitHelperNative to WaitHandle
2019-01-23Move common ThreadPool code to shared CoreLib partition. (#22115)Filip Navara1-1/+1
* Move common ThreadPool code to shared CoreLib partition. * Move numWorkingThreads counting out of shared code. * Rename ThreadPoolGlobals.vmTpInitialized to threadPoolInitialized. Remove exception handling from ThreadPoolWorkQueue.Dispatch. Remove obsolete code from ThreadPoolWorkQueue.Dispatch. Rename ThreadPool.EnsureVMInitialized to ThreadPool.EnsureInitialized.
2019-01-20Cleanup array related FCalls (#22097)Jan Kotas1-1/+1
* Cleanup Array FCalls * Disable outdated CoreFX tests https://github.com/dotnet/corefx/pull/34700
2019-01-18Add Per-assembly Load Native Library callbacks (#21555)Swaroop Sridhar1-0/+2
Add Per-assembly Load Native Library callbacks This Change implements the Native Library resolution Call-backs proposed in https://github.com/dotnet/corefx/issues/32015
2019-01-18Add comments on headers that gets parsed by Mono linker for whoever touches ↵Sung Yoon Whang1-0/+6
this next (#22054) * Add comments on headers that gets parsed by Mono linker for whoever touches this next * add more comments to the targets file
2019-01-12Add NativeLibrary Resolve Event (#21929)Swaroop Sridhar1-0/+1
This change adds the Native library resolving event, to be raised as the last attempt to resolve a native DLL in an AssemblyLoadContext. With this change, the DllImport resolution sequence is as follows (stopping at any step with successful resolution): * If the invoking-assembly is not in the default load context, call AssemblyLoadContext.LoadUnmanagedDll() * Run the default load logic, try loading from: * AppDomain cache * NATIVE_DLL_SEARCH_DIRECTORIES * Invoking-assembly directory, System32, etc. based on DllImportSearchPaths * Raise the ResolvingUnmanagedDll event API Review: https://github.com/dotnet/corefx/issues/32850 The ResolveEventTests triggered a pre-existing bug in the exception handling code (#21964). Disabling the test on ARM64 Windows until the issue is fixed.
2019-01-03Cleanup current culture handling in the unmanaged runtime (#21706)Jan Kotas1-4/+8
Large portion of the current culture handling in the unmanaged runtime inherited from desktop has been no-op. The nativeInitCultureAccessors QCall that it used to depend on desktop got (almost) never called in CoreCLR. - Delete resetting of current culture on threadpool threads. It was needed in desktop because of a very tricky flow of current culture between appdomains. It is superseded by the flowing the current culture via AsyncLocal in CoreCLR. - Comment out fetch of managed current culture for unmanaged resource lookup. It has number of problems that are not easy to fix. We are not localizing the unmanaged runtime currently anyway, so it is ok to just comment it out. - Fix the rest to call CultureInfo directly without going through Thread.CurrentThread
2019-01-01strlen to managed code and vectorize (#21729)Ben Adams1-1/+1
2018-12-29Move CultureInfo to shared CoreLib (#21672)Filip Navara1-8/+7
* Move thread CurrentCulture and CurrentUICulture variables to CultureInfo. * Move CultureInfo to shared CoreLib * Code style fixes for consistency. * Fold down APPX code into CultureInfo.CurrentCulture/CurrentUICulture. * Remove unnecessary parentheses around return statements. * Remove GetCurrentUICultureNoAppX.
2018-12-21Streamline default EqualityComparer and Comparer for Enums (#21604)Jan Kotas1-8/+4
This borrows the implementation strategy for these from CoreRT. It makes it both simpler (fewer types and lines of code) and faster in some cases since we always use the exact right underlying type. E.g. The following micro-benchmark is 25% faster with this change: ``` enum MyEnum : byte { x, y }; var comparer = Comparer<MyEnum>.Default; for (int i = 0; i < 100000000; i++) { comparer.Compare(MyEnum.x, MyEnum.y); comparer.Compare(MyEnum.y, MyEnum.x); } ```
2018-12-20Replace more of JitHelpers with S.R.CS.Unsafe (#21598)Jan Kotas1-7/+5
- Replace JitHelpers.UnsafeCastToStackPtr with Unsafe.AsPointer - Delete PinningHelper that was duplicate of RawData helper class
2018-12-10Refactor internal System.AppDomain out of CoreLib (#21460)Jan Kotas1-22/+15
Fixes #21028
2018-12-03Refactor all FCalls out of AppDomain.cs (#21337)Jan Kotas1-46/+14
This saves the unmanaged->managed->unmanaged trip to initialize the assembly binder. Includes small bits of unrelated cleanup.
2018-11-24Fix Interop/PInvoke/Miscellaneous/HandleRef tests under GCStress (#21131)Jeremy Koritzinsky1-0/+4
* Add GC.KeepAlive call in the IL stub when marshalling a HandleRef. * Add a GC.KeepAlive call for the BoxedInt since it isn't kept alive when running GC Stress * Reference HandleRef._handle via the binder instead of by field offset arithmetic * Alignment * Use Marshal.Alloc/FreeHGlobal instead of the weird no-pinning machinery that was failing before * Update HandleRefTest.cs
2018-11-24Move AppDomain local data store to AppContext and cleanup AppContext (#21180)Jan Kotas1-1/+0
Contributes to #21028
2018-11-22Delete System.AppDomainSetup (#21157)Jan Kotas1-10/+1
* Delete System.AppDomainSetup Contributes to #21028 * Add test hook for null entry assembly * Validate that the binder paths are absolute
2018-11-21Delete dead/unused code (#21138)Jan Kotas1-11/+0
2018-11-16Add explicit signatures for Span indexerJan Kotas1-2/+4
Fixes #21032 and #20958
2018-11-15Add tests for ANSI BSTRs (#20985)Jeremy Koritzinsky1-1/+1
* Add tests for ANSI BSTRs * Fix signed/unsigned mismatch in comparisons. Add xplatform include * Use regular memcpy * Enable ANSI BSTR off-windows. * Also enable UnmanagedType.TBStr off-Windows since both BStr variants are available off-Windows. * Make sure the AnsiBSTR marshaller is hooked up off-Windows. * Remove a few more ifdefs I missed. * remove ifdefs around binder definitions and the C# stub helpers. * PR Feedback. * Add xplat ARRAYSIZE macro * Move xplat ARRAYSIZE to platformdefines.h
2018-11-10Keep delegate fields alive across a full native call (#20896)Jeremy Koritzinsky1-5/+6
* Repurpose CleanupWorkList to also preserve delegate references in structs across the full native call. * Change CleanupWorkListElement to abstract base class instead of interface. * Make CleanupWorkList a singlely linked list. * PR Feedback. * Remove CleanupWorkList and make CleanupWorkListElement be able to represent the full list. * Add back throw in SafeHandle field marshalling. * PR feedback.
2018-10-26Remove some dead code related to cross-appdomain exceptions. (#20634)Austin Wise1-7/+0
2018-10-23Add support for IDispatch in CoreCLRAaron Robinson1-24/+13
Reduce some TypeInfo API cruft Throw exception on non-Windows ABIs for value types
2018-09-28Enable BSTR Marshaling Support for x-plat PInvoke (#19766)Luqun Lou1-1/+1
2018-08-30Add startup hook in System.Private.CoreLib (#19486)Sven Boemer1-0/+3
* Add startup hook in System.Private.CoreLib ProcessStartupHooks can be called from the host before the user's Main entry point. It receives a list of dlls and types containing Initialize() methods that will be called, making it possible to inject managed code early during startup. * Allow ! in assembly path for startup hook and other changes Also: - Report full assembly path when startup hook assembly is not found - Remove unnecessary assert - use Type.Delimiter instead of "." * Use C# 7 tuple syntax and remove assert * Improve error handling Throw MissingMethodException only when there aren't any Initialize methods at all. When there are Initialize methods with incorrect signatures (parameters, return type, visibility, or instance methods), throw invalid signature error. This should improve diagnosability of this feature. * Remove eager check for missing startup hook assemblies * Require full assembly path and use Split(char) overload. * Remove startup hook type syntax The type is now required to be "StartupHook" (in the global namespace). * Add assembly path to startup signature exception With a hard-coded type name, printing the type.method of the startup hook in the exception will no longer be much of an aid in debugging startup hook signature issues. Adding the assembly path makes it clear which startup hook had the problem. * Use const strings * Call startup hook inside ExecuteMainMethod This way it will be called when the application is executed, but not during other uses of hosting apis that go through coreclr_create_delegate. This change will ensure that the threading state is set based on attributes in the main method, before the startup hooks run. * Run startup hooks after setting root assembly and other fixes - Run startup hooks after setting the appdomain's root assembly (visible in Assembly.GetEntryAssembly() - Make the class static - Remove debug output - Don't allocate an empty ARG_SLOT array * Allow non-public Initialize method, adjust coding style * Remove overly-specific assert
2018-08-11Make RuntimeType sealed and deleted support for introspection only loads ↵Jan Kotas1-2/+0
(#19427) - Sealed Runtime makes `is RuntimeType` and similar checks faster. These checks are fairly common in reflection. - Delete support for introspection only loads from the runtime. We do not plan to use in .NET Core. The support for introspection loads inherited from RuntimeType and thus it is incompatible with sealed RuntimeType.
2018-08-08Move methodbody and exceptionHandlingClause to shared (#19364)Anirudh Agnihotry1-19/+19
* Changing names and making runtime files * Movel methodbody and exceptionHandlingClause to shared * Fixing build error
2018-08-08ReNaming and rearranging the variables to reduce the diff (#19338)Anirudh Agnihotry1-12/+11
* Names changes in managed side and native side * name changes in native side * Removing serialization field * lower case corrected
2018-08-03Moved LocalVariableInfo to shared (#19184)Anirudh Agnihotry1-5/+5
* File Modified * Moved to shared * Introducing RuntimeLocalVariableInfo * Build Corefx change * sealed added
2018-07-17Move Decimal to shared (#18948)Pent Ploompuu1-1/+0
* Move Decimal to shared * Remove DecimalCanonicalize{Internal}
2018-06-26Add VM support for Unsafe.AsRef(in T)Jan Kotas1-1/+2
2018-06-09Avoid NativeOverlapped pinning by allocating unmanaged memory for it (#18360)Jan Kotas1-10/+9
It makes PinnableBufferCache unnecessary
2018-06-08Moved Mutex.cs From src to shared (#18320)Anirudh Agnihotry1-1/+1
* Moved Mutex.cs to shared * Reduced #ifdef in mutex.cs * Moved windows specific Implementation and renamed mincore to kernal32 * safeWaitHandle changed to _waitHandle * moved using statement out of buffer namespace
2018-04-27Add better portable PDB caching to System.Diagnostics.StackTrace. (#17804)Mike McLaughlin1-1/+0
Add portable PDB caching to StackTrace. This is the mscorlib side of the change.
2018-04-17Convert native StringBuilder methods to managed (#17472)mikedn1-5/+0
2018-03-08Move String to shared corelib partition (#16749)Jan Kotas1-7/+10