summaryrefslogtreecommitdiff
path: root/src/tools/wasm2js.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm2js.cpp')
-rw-r--r--src/tools/wasm2js.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/wasm2js.cpp b/src/tools/wasm2js.cpp
index 24e4037e7..fb78336d0 100644
--- a/src/tools/wasm2js.cpp
+++ b/src/tools/wasm2js.cpp
@@ -18,13 +18,13 @@
// wasm2js console tool
//
+#include "wasm2js.h"
#include "optimization-options.h"
#include "pass.h"
#include "support/colors.h"
#include "support/command-line.h"
#include "support/file.h"
#include "wasm-s-parser.h"
-#include "wasm2js.h"
using namespace cashew;
using namespace wasm;
@@ -123,7 +123,8 @@ static void traversePrePost(Ref node,
}
static void traversePost(Ref node, std::function<void(Ref)> visit) {
- traversePrePost(node, [](Ref node) {}, visit);
+ traversePrePost(
+ node, [](Ref node) {}, visit);
}
static void replaceInPlace(Ref target, Ref value) {
@@ -604,7 +605,8 @@ Ref AssertionEmitter::emitAssertReturnFunc(Builder& wasmBuilder,
Expression* expected = sexpBuilder.parseExpression(e[2]);
Type resType = expected->type;
actual->type = resType;
- switch (resType.getSingle()) {
+ TODO_SINGLE_COMPOUND(resType);
+ switch (resType.getBasic()) {
case Type::i32:
body = wasmBuilder.makeBinary(EqInt32, actual, expected);
break;