Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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

Finalize tail call support #2246

Merged
merged 9 commits into from Jul 24, 2019
Merged

Finalize tail call support #2246

merged 9 commits into from Jul 24, 2019

Conversation

@tlively
Copy link
Collaborator

tlively commented Jul 21, 2019

Adds tail call support to fuzzer and makes small changes to handle return calls in multiple utilities and passes. Makes larger changes to DAE and inlining passes to properly handle tail calls.

Copy link
Member

kripken left a comment

Nice work!

src/passes/DeadArgumentElimination.cpp Outdated Show resolved Hide resolved
isUnreachable = true;
break;
}
}

This comment has been minimized.

Copy link
@kripken

kripken Jul 21, 2019

Member

I feel this logic should be in ir/ as a utility function. Perhaps in a file for utilities for ExpressionLists (which doesn't exist yet). Or maybe is there some functional programming-style way to write this in modern C++?

This comment has been minimized.

Copy link
@tlively

tlively Jul 21, 2019

Author Collaborator

This would be a good job for std::any_of, which I just learned exists 🎉

src/passes/Inlining.cpp Outdated Show resolved Hide resolved
src/tools/fuzzing.h Show resolved Hide resolved
src/tools/fuzzing.h Show resolved Hide resolved
src/wasm/wasm-validator.cpp Outdated Show resolved Hide resolved
} else {
if (curr->type == unreachable) {
bool hasUnreachableOperand = false;
for (auto* op : curr->operands) {

This comment has been minimized.

Copy link
@kripken

kripken Jul 21, 2019

Member

good place to use the helper function I suggested earlier

if (curr->target->type != unreachable) {
bool hasUnreachableOperand = false;
for (auto* op : curr->operands) {
if (op->type == unreachable) {

This comment has been minimized.

Copy link
@kripken

kripken Jul 21, 2019

Member

also here

@tlively

This comment has been minimized.

Copy link
Collaborator Author

tlively commented Jul 22, 2019

The fuzzer just passed 100,000 iterations on this PR! 🎉 🎉 🎉

@kripken

This comment has been minimized.

Copy link
Member

kripken commented Jul 22, 2019

Thanks for the replies, sgtm.

@tlively tlively marked this pull request as ready for review Jul 23, 2019
@tlively tlively merged commit a2741b3 into WebAssembly:master Jul 24, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.