Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Implement transition thunk for Unix amd64 #1653

Merged
merged 1 commit into from
Aug 16, 2016
Merged

Implement transition thunk for Unix amd64 #1653

merged 1 commit into from
Aug 16, 2016

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Aug 15, 2016

No description provided.

@jkotas
Copy link
Member Author

jkotas commented Aug 16, 2016

@dotnet-bot test this please

@jkotas jkotas changed the title WIP: Implement transition thunk for Unix amd64 Implement transition thunk for Unix amd64 Aug 16, 2016
@jkotas
Copy link
Member Author

jkotas commented Aug 16, 2016

@davidwrighton @MichalStrehovsky PTLA

@@ -17,8 +17,7 @@ internal unsafe static class CachedInterfaceDispatch
unsafe private static IntPtr RhpCidResolve(IntPtr callerTransitionBlockParam, IntPtr pCell)
{
IntPtr locationOfThisPointer = callerTransitionBlockParam + TransitionBlock.GetThisOffset();
IntPtr thisPointerAsIntPtr = *(IntPtr*)locationOfThisPointer;
object pObject = RuntimeAugments.ConvertIntPtrToObjectReference(thisPointerAsIntPtr);
object pObject = Unsafe.As<IntPtr, Object>(ref *(IntPtr*)locationOfThisPointer);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichalStrehovsky I cherry picked this from your larger change to cleanup ConvertIntPtrToObjectReference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I received the necessary signoff from the codegen team and the larger cleanup is now en route to the nmirror branch.

@MichalStrehovsky
Copy link
Member

Looks reasonable to me, but I never really spent time trying to understand the transition thunk logic in general...

@jkotas jkotas merged commit 7b93a9f into dotnet:master Aug 16, 2016
@jkotas jkotas deleted the transition-thunk branch August 20, 2016 08:12
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.

3 participants