summaryrefslogtreecommitdiff
path: root/src/passes/TrapMode.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-01-07 11:16:44 -0800
committerGitHub <noreply@github.com>2020-01-07 11:16:44 -0800
commite8f9d207427bda2f6e22c28ff0210b294b1f70e1 (patch)
tree503b20fb06274e38af7e25e3a1a4106827c52693 /src/passes/TrapMode.cpp
parentf73b40c7873dbd2dd46a962f3afe5b97a7fc8b0a (diff)
downloadbinaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.gz
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.bz2
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.zip
[NFC] Enforce use of `Type::` on type names (#2434)
Diffstat (limited to 'src/passes/TrapMode.cpp')
-rw-r--r--src/passes/TrapMode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/TrapMode.cpp b/src/passes/TrapMode.cpp
index 9c855d8c1..f3cf3c63c 100644
--- a/src/passes/TrapMode.cpp
+++ b/src/passes/TrapMode.cpp
@@ -99,7 +99,7 @@ bool isTruncOpSigned(UnaryOp op) {
Function* generateBinaryFunc(Module& wasm, Binary* curr) {
BinaryOp op = curr->op;
Type type = curr->type;
- bool isI64 = type == i64;
+ bool isI64 = type == Type::i64;
Builder builder(wasm);
Expression* result = builder.makeBinary(
op, builder.makeLocalGet(0, type), builder.makeLocalGet(1, type));
@@ -145,7 +145,7 @@ Function* generateUnaryFunc(Module& wasm, Unary* curr) {
Type type = curr->value->type;
Type retType = curr->type;
UnaryOp truncOp = curr->op;
- bool isF64 = type == f64;
+ bool isF64 = type == Type::f64;
Builder builder(wasm);
@@ -276,12 +276,12 @@ Expression* makeTrappingUnary(Unary* curr,
// slow ffi If i64, there is no "JS" way to handle this, as no i64s in JS, so
// always clamp if we don't allow traps asm.js doesn't have unsigned
// f64-to-int, so just use the signed one.
- if (curr->type != i64 && mode == TrapMode::JS) {
+ if (curr->type != Type::i64 && mode == TrapMode::JS) {
// WebAssembly traps on float-to-int overflows, but asm.js wouldn't, so we
// must emulate that
ensureF64ToI64JSImport(trappingFunctions);
Expression* f64Value = ensureDouble(curr->value, wasm.allocator);
- return builder.makeCall(F64_TO_INT, {f64Value}, i32);
+ return builder.makeCall(F64_TO_INT, {f64Value}, Type::i32);
}
ensureUnaryFunc(curr, wasm, trappingFunctions);