Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
* 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
|
|
|
|
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.
|
|
* Move Exception to shared partition
* Remove class name caching
* Not useful comments removal
|
|
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.
|
|
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.
|
|
Remove loose dependency in runtime on System.ComponentModel.
Disable test to sync with CoreFX
|
|
Add Serialization Guard API and consume it in CoreLib targets
|
|
|
|
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
|
|
more generic g_pObjectClass
|
|
(#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
|
|
* Remove unnecessary fields from WaitHandle
* Drop volatile from _waitHandle
* Address race condition in unmanaged code
* Remove unused hasThreadAffinity parameters
* Fix FCDECL argument counts
|
|
* 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
|
|
* Move SynchronizationContext to shared partition
* Move WaitHelperNative to WaitHandle
|
|
* 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.
|
|
* Cleanup Array FCalls
* Disable outdated CoreFX tests
https://github.com/dotnet/corefx/pull/34700
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
|
|
* 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.
|
|
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);
}
```
|
|
- Replace JitHelpers.UnsafeCastToStackPtr with Unsafe.AsPointer
- Delete PinningHelper that was duplicate of RawData helper class
|
|
Fixes #21028
|
|
This saves the unmanaged->managed->unmanaged trip to initialize the assembly binder.
Includes small bits of unrelated cleanup.
|
|
* 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
|
|
Contributes to #21028
|
|
* Delete System.AppDomainSetup
Contributes to #21028
* Add test hook for null entry assembly
* Validate that the binder paths are absolute
|
|
|
|
Fixes #21032 and #20958
|
|
* 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
|
|
* 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.
|
|
|
|
Reduce some TypeInfo API cruft
Throw exception on non-Windows ABIs for value types
|
|
|
|
* 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
|
|
(#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.
|
|
* Changing names and making runtime files
* Movel methodbody and exceptionHandlingClause to shared
* Fixing build error
|
|
* Names changes in managed side and native side
* name changes in native side
* Removing serialization field
* lower case corrected
|
|
* File Modified
* Moved to shared
* Introducing RuntimeLocalVariableInfo
* Build Corefx change
* sealed added
|
|
* Move Decimal to shared
* Remove DecimalCanonicalize{Internal}
|
|
|
|
It makes PinnableBufferCache unnecessary
|
|
* 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
|
|
Add portable PDB caching to StackTrace.
This is the mscorlib side of the change.
|
|
|
|
|