diff options
author | Faizur Rahman <shrah@microsoft.com> | 2017-04-19 03:44:22 +0300 |
---|---|---|
committer | Faizur Rahman <shrah@microsoft.com> | 2017-04-19 03:44:22 +0300 |
commit | 742860cc1d1fa9ded49b29495fd370c44f15707e (patch) | |
tree | 2aabf164ef4f971af19c9c3d598be57bbacab37f /src/Native/Runtime/arm | |
parent | c7d29fd9d840e42c538519bc85ab02116f9d5587 (diff) |
Unify delegate marshalling runtime infrastructure between CoreRT and .NET Native
This change unifies the runtime delegate marshalling infrastructure between CoreRT and .NET Native by removing duplicate codes and moving shared helpers to PInvokeMarshal in CoreLib. I got rid of the InteropThunskHelpers from Interop.Native directory and instead used the ones already ported to CoreRT. With this unification the delegate marshalling memory leak issue(which was caused by not having a cache) should be gone.
[tfs-changeset: 1654801]
Diffstat (limited to 'src/Native/Runtime/arm')
-rw-r--r-- | src/Native/Runtime/arm/InteropThunksHelpers.S | 18 | ||||
-rw-r--r-- | src/Native/Runtime/arm/InteropThunksHelpers.asm | 20 |
2 files changed, 19 insertions, 19 deletions
diff --git a/src/Native/Runtime/arm/InteropThunksHelpers.S b/src/Native/Runtime/arm/InteropThunksHelpers.S index 109718d38..15749ba55 100644 --- a/src/Native/Runtime/arm/InteropThunksHelpers.S +++ b/src/Native/Runtime/arm/InteropThunksHelpers.S @@ -10,28 +10,28 @@ // TODO: Implement Arm support // -// InteropNative_CommonStub +// RhCommonStub // -NESTED_ENTRY InteropNative_CommonStub, _TEXT, NoHandler +NESTED_ENTRY RhCommonStub, _TEXT, NoHandler #ifdef _DEBUG bl C_FUNC(NYI_Assert) #endif -NESTED_END InteropNative_CommonStub, _TEXT +NESTED_END RhCommonStub, _TEXT // -// IntPtr InteropNative_GetCommonStubAddress() +// IntPtr RhGetCommonStubAddress() // -LEAF_ENTRY InteropNative_GetCommonStubAddress, _TEXT +LEAF_ENTRY RhGetCommonStubAddress, _TEXT #ifdef _DEBUG bl C_FUNC(NYI_Assert) #endif -LEAF_END InteropNative_GetCommonStubAddress, _TEXT +LEAF_END RhGetCommonStubAddress, _TEXT // -// IntPtr InteropNative_GetCurrentThunkContext() +// IntPtr RhGetCurrentThunkContext() // -LEAF_ENTRY InteropNative_GetCurrentThunkContext, _TEXT +LEAF_ENTRY RhGetCurrentThunkContext, _TEXT #ifdef _DEBUG bl C_FUNC(NYI_Assert) #endif -LEAF_END InteropNative_GetCurrentThunkContext, _TEXT +LEAF_END RhGetCurrentThunkContext, _TEXT diff --git a/src/Native/Runtime/arm/InteropThunksHelpers.asm b/src/Native/Runtime/arm/InteropThunksHelpers.asm index bb1770a70..1de9b25da 100644 --- a/src/Native/Runtime/arm/InteropThunksHelpers.asm +++ b/src/Native/Runtime/arm/InteropThunksHelpers.asm @@ -23,9 +23,9 @@ ThunkParamSlot % 0x4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Interop Thunks Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; - ;; InteropNative_CommonStub + ;; RhCommonStub ;; - NESTED_ENTRY InteropNative_CommonStub + NESTED_ENTRY RhCommonStub ;; Custom calling convention: ;; red zone has pointer to the current thunk's data block (data contains 2 pointer values: context + target pointers) ;; Copy red zone value into r12 so that the PROLOG_PUSH doesn't destroy it @@ -52,22 +52,22 @@ ThunkParamSlot % 0x4 ldr r12, [r12, #POINTER_SIZE] EPILOG_POP {r0-r3} bx r12 - NESTED_END InteropNative_CommonStub + NESTED_END RhCommonStub ;; - ;; IntPtr InteropNative_GetCommonStubAddress() + ;; IntPtr RhGetCommonStubAddress() ;; - LEAF_ENTRY InteropNative_GetCommonStubAddress - ldr r0, =InteropNative_CommonStub + LEAF_ENTRY RhGetCommonStubAddress + ldr r0, =RhCommonStub bx lr - LEAF_END InteropNative_GetCommonStubAddress + LEAF_END RhGetCommonStubAddress ;; - ;; IntPtr InteropNative_GetCurrentThunkContext() + ;; IntPtr RhGetCurrentThunkContext() ;; - LEAF_ENTRY InteropNative_GetCurrentThunkContext + LEAF_ENTRY RhGetCurrentThunkContext ldr r3, =_tls_index ldr r2, [r3] @@ -79,6 +79,6 @@ ThunkParamSlot % 0x4 ldr r0, [r2, r3] ;; r0 <- ThunkParamSlot bx lr - LEAF_END InteropNative_GetCurrentThunkContext + LEAF_END RhGetCurrentThunkContext END |