summaryrefslogtreecommitdiff
path: root/src/vm/assemblynative.hpp
AgeCommit message (Collapse)AuthorFilesLines
2019-04-11Contextual reflection (#23740)Steve MacLean1-2/+2
* 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-04Runtime support for upcoming .NET Core WinRT Host (#23402)Jeremy Koritzinsky1-0/+3
* First pass at adding winrt host entry-point. * There's no way to specify HResult-swapping on a function called via hosted-interop so just return the HResult instead. * Use the WindowsRuntimeMarshal class to create the activation factory and initialize it. * Implement loading the dependent assemblies of a WinRT assembly into an isolated load context. * PR Feedback. * Fail to get the activation factory if the found type is not a managed type exported from a winmd. * Rearrange parameters based on PR feedback. * Remove unneeded include. * Make ActivationFactoryLoader internal. * Fix null-ref in WinRT-dependent-assembly loading * Remove extraneous "System."
2019-03-20Runtime changes for IJW Activation (#22636)Jeremy Koritzinsky1-0/+3
* Implement loading an assembly from an HMODULE on Windows. * Use the native runtime to execute the main method so I don't have to replicate all of the startup behavior. * If ijwhost is loaded, then call back into ijwhost to resolve tokens for vtable entries. * Refactor our various component loaders (COM and IJW) and have IJW load components into separate ALCs when loaded from native. * Move VTableFixups after DeliverSyncEvents in our incremental load. We need the module to be loaded to at least FILE_LOAD_DELIVER_EVENTS when resolving dependencies loaded via VTableFixups, otherwise they try to load into the default ALC. * Only try to get ijwhost module handle on Windows. * Use defined() instead of ifndef * Fix off-Windows build break and fix unvalid comment. * ComponentLoadContext->IsolatedComponentLoadContext * Only build InMemoryAssemblyLoader when targeting windows. * Add doc comments for IsolatedComponentLoadContext. * Rename qcall. * Add comment for boolean parameter. * Add null check for managed ExecuteMainMethod entrypoint. * Add comments in ceeload.cpp for the ijwhost method resolution. * Add test verifying runtime callback to IJW host. * Add test for InMemoryAssemblyLoader.LoadInMemoryAssembly. * Fix x86 behavior rel. loading symbols by name and stdcall mangling. * Remove exe entrypoints. The executable case for mixed-mode will go through the normal .NET Core app model (no special hosting support needed). * Clean up whitespace * Add test verifying M->N->M ALC switch behavior with IJW. * Resolve the ijwhost module by probing the PE for the IJW assembly instead of hardcoding the name. * Remove static caching in GetTokenGetterFromHostModule. * Disable new IJW tests on Win7. * PR Feedback. * Cleanup extra copy of function. * Use old-style environment checking in LoadIjwFromModuleHandle since we reference S.P.CL directly. * Fix break in rebase * Clean up fake mscoree code. * Only validate that a CLR header exists. The OS verifies everything else. * Make ijw host resolution code static to ceeload.cpp * Use bracketed include for xplatform.h * Update comment on _CorDllMain * PR feedback. * Remove .def file. * PR feedback. * Verify we export correctly on x86 and x64. * Fix path to ijwhostmock for CopyConstructorMarshaler * Disable IJW tests on arm32 nightly. Can't repro the dependency load failures. Fixes #23358
2019-02-21Clean up unused parameters around Assembly::Load (#22716)Marek Safar1-2/+1
2019-02-06Implement ↵Marek Safar1-3/+0
ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute (#22372) * Implement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute in shared managed code * Remove native ::GetNeutralResourcesLanguage
2019-01-06Remove CAS era security checks around resource loads (#21825)Filip Navara1-2/+2
2018-11-21Delete dead/unused code (#21138)Jan Kotas1-2/+0
2018-10-24Add IsCollectible property to Assembly and necessary backing functions (#20574)John Salem1-0/+2
2018-08-23Enable unloading of AssemblyLoadContext (#18476)Jan Vorlicek1-1/+2
Enable assembly unloading * Allow PInvoke methods on collectible assemblies * Fix test unloadability Several hundreds of tests were using Helper class that created GCHandle, but never freed it. That prevented unloading of those tests. The change modifies the Helper class to keep the handle in a finalizable object. Several GCHandle related tests were not freeing the GCHandle they allocated, so this change adds freeing them to enable the unloading. * Add missing error messages to the resources * Fix shuffle thunk cache for unloadability * Add GetLoaderAllocator to ICLRPrivBinder
2018-08-14Delete dead code (#19452)Jan Kotas1-44/+0
Unused strong name signing paths and related code
2017-07-30Remove extra qualification in member function declaration (#13104)Xiang Fan1-1/+1
Fix issues mentioned in https://github.com/dotnet/coreclr/issues/12799
2017-07-26Implement Assembly.GetForwardedTypes() on CoreCLR (#13001)Atsushi Kanamori1-1/+4
Fixes https://github.com/dotnet/coreclr/issues/12391 Original approval and specs at https://github.com/dotnet/corefx/issues/19789
2017-05-17Finish deleting dead CAS code from CoreLib (#11436)Jan Kotas1-40/+1
Fixes #9321 and deletes CleanupToDoList.cs Delete unmanaged security implementation
2017-05-06Delete dead code (#11431)Jan Kotas1-7/+0
2017-04-28Correctly enumerate loaded assemblies in AppDomain (#11294)Gaurav Khanna1-1/+0
* Correctly enumerate loaded assemblies in AppDomain * Remove unrequired attribute
2017-02-10Remove always undefined FEATURE_CAS_POLICYdanmosemsft1-4/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-40/+0
2016-10-25Add implementation of AppDomain.GetAssembliesRahul Kumar1-0/+1
2016-08-09Fix LoadFromAssemblyName to invoke fallback context (analogous to static ↵Gaurav Khanna1-2/+3
assembly loads within the context)
2016-05-07Remove FEATURE_HOSTED_BINDER definition (#4838)Jan Vorlicek1-12/+0
The FEATURE_HOSTED_BINDER is always on so remove it from all the sources.
2016-05-06Fix Windows x86 exception handling issue (#4830)Jan Vorlicek1-1/+1
This change fixes an exception handling issue that happens on x86 on Windows when exception is raised in System.RuntimeType.MakeGenericType. The problem was caused by GCPROTECT_HOLDER macro in RuntimeTypeHandle::GetTypeByName that causes popping of GCFrame (and zeroing its m_next field) that's in the middle of the thread's frames list during the stack unwinding. That breaks the list and when UnwindFrames happen later and tries to walk the stack, the StackFrameIterator::NextRaw asserts when checking the validity of the list. The fix is to move the keepAlive to the managed caller of the RuntimeTypeHandle::GetTypeByName QCall, which removes the need for the GCPROTECT_HOLDER. Since it was the only usage of that holder and of the underlying FrameWithCookieHolder class, I've removed those. In addition to that, I've modified COMModule::GetType and AssemblyNative::GetType to use the same pattern, since they could also suffer from the problem the GCPROTECT_HOLDER was attempting to fix.
2016-03-23Remove special casing of platform assembliesJan Kotas1-15/+0
2016-01-27Update license headersdotnet-bot1-4/+3
2016-01-12Add support Load assemblies from explicit path/streams into default load contextGaurav Khanna (CLR)1-2/+2
2015-09-25Add AssemblyLoadContext.LoadUnmanagedDllFromPathfor use by overriders of ↵Koundinya Veluri1-0/+1
AssemblyLoadContext.LoadUnmanagedDll LoadUnmanagedDllFromPath needs to call LoadLibrary or dlopen, and return the system handle to the library through LoadUnmanagedDll. Outside Windows, when LoadUnmanagedDll returns a system handle to a library, the handle needs to be registered with PAL's module list for lifetime management. From that point on, the system handle is tracked as part of the PAL handle. To handle both of the above, I have refactored module.cpp!LOADLoadLibrary into a LoadLibraryDirect portion and a RegisterLibrary component. LoadLibraryDirect loads the specified library directly using the system call, without appending or prepending anything to the library name RegisterLibrary registers a system library handle with PAL to get a PAL handle This patch contains the necessary changes to coreclr and mscorlib. Tests will be added separately, after the new APIs are published and can be consumed. Fixes dotnet/coreclr#935 Part of dotnet/coreclr#937 and dotnet/corefx#3054 See https://github.com/dotnet/coreclr/pull/1500 [tfs-changeset: 1529692]
2015-09-09Add AssemblyExtensions.TryGetRawMetadata to the System.Reflection.Metadata ↵Koundinya Veluri1-0/+2
namespace. This patch contains has the necessary changes in coreclr and mscorlib. Tests will be added separately, once the new API is published and can be consumed. Part of dotnet/corefx#2768
2015-03-26Fix about 12 kinds of warnings over the codebaseJan Vorlicek1-1/+1
This change fixes: 1) Member initiazalization order in class constructor didn't correspond to the member order in some classes 2) Objects with vtables were copied via memcpy. While this is intentional, cast of the pointers to void* is required to silence clang warning 3) Switch case statements containing values of different enums 4) Casting int to pointer 5) Missing return value in methods with _ASSERTE 6) Class name classifier on methods in the .h 7) Invalid position of the DECLSPEC_ALIGN at few places - it had no effect 8) Invalid position of the 'used' attribute 9) Issue with comparing holders to NULL 10) Operator 'new' returning NULL without being marked with throw() or noexcept 11) Variables marked as 'extern' at the declaration / initialization place 12) Data structure declared as struct at one place and forward declared as class at another Some disabled warnings were no longer happening, so options to disable them were removed too
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+288
[tfs-changeset: 1407945]