summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/Print.cpp7
-rw-r--r--src/wasm/wasm-s-parser.cpp7
2 files changed, 5 insertions, 9 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index ecdfe16eb..9cc8b52ca 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2023,11 +2023,8 @@ struct PrintExpressionContents
void visitNop(Nop* curr) { printMinor(o, "nop"); }
void visitUnreachable(Unreachable* curr) { printMinor(o, "unreachable"); }
void visitPop(Pop* curr) {
- prepareColor(o) << "pop";
- for (auto type : curr->type) {
- o << ' ';
- printType(type);
- }
+ prepareColor(o) << "pop ";
+ printType(curr->type);
restoreNormalColor(o);
}
void visitTupleMake(TupleMake* curr) {
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index af042bd55..26af9ee00 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -2394,11 +2394,10 @@ Expression* SExpressionWasmBuilder::makeMemoryFill(Element& s) {
Expression* SExpressionWasmBuilder::makePop(Element& s) {
auto ret = allocator.alloc<Pop>();
- std::vector<Type> types;
- for (size_t i = 1; i < s.size(); ++i) {
- types.push_back(elementToType(*s[i]));
+ if (s.size() != 2) {
+ throw SParseException("expected 'pop <valtype>'", s);
}
- ret->type = Type(types);
+ ret->type = elementToType(*s[1]);
ret->finalize();
return ret;
}