Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge nmirror to master - #1615

Merged
MichalStrehovsky merged 9 commits into
masterfrom
nmirror
Aug 3, 2016
Merged

MichalStrehovsky merged 9 commits into
masterfrom
nmirror

Conversation

@jkotas

@jkotas jkotas commented Aug 3, 2016

Copy link
Copy Markdown
Member

No description provided.

jkotas and others added 9 commits July 29, 2016 10:49
     Almost all of these changes are from Ryan. I just split original change into two parts--product change and testcase change. :)

     This change is to enable Interop CallInterceptor for WinRT Marshalling(Array, IEnumerable, Struct, string, blittable),  WinRT call (manually created RCW/CCW) and PInvoke marshalling(array, string....). This change is the foundation of Interop CallInterceptor.

     System.Private.TypeLoader:
     1. Decouple the dependency between System.Private.TypeLoader and System.Private.Interop during compile time. now System.Private.TypeLoader will use MemAlloc/MemFree in System.Private.Corlib instead of Marshal.Alloc* in System.Private.Interop
     2. Use Read<T>(IntPtr)/Write<T>(IntPtr, T) in System.Private.Corlib to read/write data from IntPtr to simulate il instruction:ldobj/stobj.

     System.Private.CorLib:
     1. InternalReflectionWhiteList.txt: Add couples Marshaller types in System.Private.Interop, since Dynamic Interop will use these marshaller throught reflection during runtime.
     2. Expose MemAlloc/MemFree to other library(such as System.Private.TypeLoader) to use.
     3. Implement T Read<T>(IntPtr)/Write<T>(IntPtr, T). In future nutc should be able to generic these methods directly(this part need some design).

     Interop:
     1. All these marshaller/testcase are from ryan. :)
     2. LoadLibrary/GetProcAddress API not supported in UWP, so put all these Pinvoke into helpers.cs.
     3. Update System.Private.MCG.dll due to TOF Testcase use contract assembly.
     4. Add DependencyReductionRootAttribute for IIterable<T> and IIterator<T>
     5. Restrict The testcase to run only on amd64

     TODO:
     1. Update MCG to use the VirtualAddrOf method in System.Private.Interop. Currently MCG will dynamically generate this method
     2. Is it possible to Use Internal.Runtime.CompilerHelper.ResolvePInvoke to trigger pinvoke call?
     3. Refactor Write<T>/Read<T> so that ntuc can recognize it is stobj/ldobj instruction and generate better code.

[tfs-changeset: 1620469]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants