Skip to content

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Jan 22, 2024

This renames ***Stack variables in CFGWalker to be consistent, as a preparation for adding another stack for the new EH. Currently ifStack and loopStack contains BasicBlock*s but tryStack contains Expression*, and Try expressions are rather contained in unwindExprStack, which to me is confusing.

This renames `***Stack` variables in `CFGWalker` to be consistent, as a preparation for adding another stack for the new EH. Currently `ifStack` and `loopStack` contains `BasicBlock*`s but `tryStack` contains `Expression*`, and `Try` expressions are rather contained in `unwindExprStack`, which to me is confusing. This also swaps the order of some code which is NFC (to make the later diff cleaner).
@aheejin aheejin requested a review from kripken January 22, 2024 21:46
auto* tryy = self->unwindExprStack[i]->template cast<Try>();
// Exception thrown. Note outselves so that we will create a link to each
// catch within the try when we get there.
self->throwingInstsStack[i].push_back(self->currBasicBlock);
Copy link
Member

Choose a reason for hiding this comment

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

This code movement is not obviously NFC to me. Before it was not reached if we got to the break or continue on new lines 293 and 307?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, you're right. Will revert this.

@aheejin aheejin merged commit de223c5 into WebAssembly:main Jan 23, 2024
@aheejin aheejin deleted the cfg_walker_rename branch January 23, 2024 03:26
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
This renames `***Stack` variables in `CFGWalker` to be consistent, as a preparation for adding another stack for the new EH. Currently `ifStack` and `loopStack` contains `BasicBlock*`s but `tryStack` contains `Expression*`, and `Try` expressions are rather contained in `unwindExprStack`, which to me is confusing.
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants