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

Change CORERT TODO ifdefs to USE_PORTABLE_HELPERS as appropriate - #1317

Merged
jkotas merged 1 commit into
dotnet:masterfrom
jkotas:stack-iterator
May 24, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
jkotas:stack-iterator

Conversation

@jkotas

@jkotas jkotas commented May 24, 2016

Copy link
Copy Markdown
Member

No description provided.

@jkotas

jkotas commented May 24, 2016

Copy link
Copy Markdown
Member Author

@janvorli PTLA There are a few fixes in the Unix assembly


if (EQUALS_CODE_ADDRESS(m_ControlPC, RhpCallCatchFunclet2))
{
SP = (PTR_UIntNative)(m_RegDisplay.SP + 0x38);

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.

Would it make sense to declare the local block sizes as constants shared between the asm and C++ code and unify the Unix / Windows code (with two ifdefs around the regdisplay stuff that is platform specific)?
Later we could add target specific methods to the REGDISPLAY to copy the register pointers and to load the registers from the stack - it seems some of the code above could contain less ifdefs if we did that for those too.

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.

@smosier Do you have thoughts on the best factoring for these chains of platform-specific ifdefs? Maybe move them all into a platform-specific header file?

Either way, the refactoring this should rather be a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we could declare the abstract operations as inline functions on the StackFrameIterator class and then platform-specific header files could provide the inline function definitions. It would give us the opportunity to better document the expected semantic at the declaration point and have separated implementations of the methods per-ABI. It's possible that the current methods (such as UnwindFuncletInvokeThunk / UpdateFromExceptionDispatch / etc) are at the the right abstraction level, but I'm willing to consider that they aren't.

@janvorli

Copy link
Copy Markdown
Member

LGTM with just nit minor suggestion.

@jkotas
jkotas merged commit 5008338 into dotnet:master May 24, 2016
@jkotas
jkotas deleted the stack-iterator branch May 25, 2016 04:18
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