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

Implement transition thunk for Unix amd64 - #1653

Merged
jkotas merged 1 commit into
dotnet:masterfrom
jkotas:transition-thunk
Aug 16, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
jkotas:transition-thunk

Conversation

@jkotas

@jkotas jkotas commented Aug 15, 2016

Copy link
Copy Markdown
Member

No description provided.

@jkotas

jkotas commented Aug 16, 2016

Copy link
Copy Markdown
Member Author

@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

jkotas commented Aug 16, 2016

Copy link
Copy Markdown
Member Author

@davidwrighton @MichalStrehovsky PTLA

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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