-
Notifications
You must be signed in to change notification settings - Fork 5k
Delete dead code in ExceptionTracker and leftover old EH code #114121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The diff is not well matched, it is all just deleted lines. |
T_CONTEXT* pContextRecord, ExceptionTracker *pTracker, bool* pfAborting = NULL); | ||
UINT_PTR CallCatchHandler(T_CONTEXT* pContextRecord, bool* pfAborting = NULL); | ||
|
||
static bool FindNonvolatileRegisterPointers(Thread* pThread, UINT_PTR uOriginalSP, REGDISPLAY* pRegDisplay, TADDR uResumeFrameFP); | ||
static void UpdateNonvolatileRegisters(T_CONTEXT* pContextRecord, REGDISPLAY *pRegDisplay, bool fAborting); | ||
|
||
PTR_Frame GetLimitFrame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still seems to be called from ResetThreadAbortState
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one is not needed either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the FEATURE_EH_FUNCLETS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll submit a follow up PR once this is merged. Rough preview: 7891236
@@ -673,10 +563,6 @@ private: ; | |||
|
|||
void ReleaseResources(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit harder to reason about this since it's not purely unreferenced code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically anything that references non-static methods in the ExceptionTracker is a dead code. No ExceptionTracker instance gets ever created with the new EH. The ExInfo has replaced it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
void SetEnclosingClauseInfo(bool fEnclosingClauseIsFunclet, | ||
DWORD dwEnclosingClauseOffset, | ||
UINT_PTR uEnclosingClauseCallerSP); | ||
|
||
struct EnclosingClauseInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a rather long usage chain for this going from StackFrameIterator::Filter
-> GetCallerOfEnclosingClause
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The StackFrameIterator::Filter contains dead code too. Anything that executes when pTracker is not null.
@janvorli FWIW This is not comprehensive. I can address the other things you pointed out but I would prefer to do it separately from just deleting unreferenced code (to keep it reviewable). |
I am fine with that approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
/ba-g the test failures occur on all PRs recently |
Ref: #114018 (comment)