diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-05-22 13:19:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 13:19:47 -0700 |
commit | bb0ff51597f254ab199f8ad5b63de7a4bbca2c17 (patch) | |
tree | 2932c64f443ec7a36385c0ac96e865d0a9d8c53b /src/passes/Print.cpp | |
parent | c193e5727d541ad04bb1601da92f2a86ae959cc8 (diff) | |
download | binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.tar.gz binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.tar.bz2 binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.zip |
Remove `Push` (#2867)
Push and Pop have been superseded by tuples for their original
intended purpose of supporting multivalue. Pop is still used to
represent block arguments for exception handling, but there are no
plans to use Push for anything now or in the future.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 62eac9b06..efa31cac0 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -1436,7 +1436,6 @@ struct PrintExpressionContents } void visitNop(Nop* curr) { printMinor(o, "nop"); } void visitUnreachable(Unreachable* curr) { printMinor(o, "unreachable"); } - void visitPush(Push* curr) { prepareColor(o) << "push"; } void visitPop(Pop* curr) { prepareColor(o) << curr->type; o << ".pop"; @@ -2008,13 +2007,6 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { PrintExpressionContents(currFunction, o).visit(curr); o << ')'; } - void visitPush(Push* curr) { - o << '('; - PrintExpressionContents(currFunction, o).visit(curr); - incIndent(); - printFullLine(curr->value); - decIndent(); - } void visitPop(Pop* curr) { o << '('; PrintExpressionContents(currFunction, o).visit(curr); @@ -2600,9 +2592,9 @@ WasmPrinter::printStackIR(StackIR* ir, std::ostream& o, Function* func) { switch (inst->op) { case StackInst::Basic: { doIndent(); - // push and pop are pseudo instructions and should not be printed in the - // stack IR format to make it valid wat form. - if (inst->origin->is<Push>() || inst->origin->is<Pop>()) { + // Pop is a pseudo instruction and should not be printed in the stack IR + // format to make it valid wat form. + if (inst->origin->is<Pop>()) { break; } PrintExpressionContents(func, o).visit(inst->origin); |