summaryrefslogtreecommitdiff
path: root/src/wasm2js.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r--src/wasm2js.h31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index 8418d5b15..727e87379 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -1268,9 +1268,8 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
ValueBuilder::makePtrShift(ptr, 2));
break;
default: {
- std::cerr << "Unhandled number of bytes in i32 load: "
- << curr->bytes << std::endl;
- abort();
+ Fatal() << "Unhandled number of bytes in i32 load: "
+ << curr->bytes;
}
}
break;
@@ -1284,8 +1283,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
ValueBuilder::makePtrShift(ptr, 3));
break;
default: {
- std::cerr << "Unhandled type in load: " << curr->type << std::endl;
- abort();
+ Fatal() << "Unhandled type in load: " << curr->type;
}
}
if (curr->isAtomic) {
@@ -1378,9 +1376,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
ValueBuilder::makePtrShift(ptr, 3));
break;
default: {
- std::cerr << "Unhandled type in store: " << curr->valueType
- << std::endl;
- abort();
+ Fatal() << "Unhandled type in store: " << curr->valueType;
}
}
if (curr->isAtomic) {
@@ -1431,7 +1427,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
PLUS, ValueBuilder::makeDouble(curr->value.getf64()));
}
default:
- abort();
+ Fatal() << "unknown const type";
}
}
@@ -1510,9 +1506,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
ValueBuilder::makeNum(16));
}
default: {
- std::cerr << "Unhandled unary i32 operator: " << curr
- << std::endl;
- abort();
+ Fatal() << "Unhandled unary i32 operator: " << curr;
}
}
}
@@ -1607,8 +1601,7 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
return ret;
}
default: {
- std::cerr << "Unhandled type in unary: " << curr << std::endl;
- abort();
+ Fatal() << "Unhandled type in unary: " << curr;
}
}
}
@@ -1771,17 +1764,14 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
case CopySignFloat32:
case CopySignFloat64:
default:
- std::cerr << "Unhandled binary float operator: " << curr
- << std::endl;
- abort();
+ Fatal() << "Unhandled binary float operator: ";
}
if (curr->type == Type::f32) {
return makeAsmCoercion(ret, ASM_FLOAT);
}
return ret;
default:
- std::cerr << "Unhandled type in binary: " << curr << std::endl;
- abort();
+ Fatal() << "Unhandled type in binary: " << curr;
}
return makeAsmCoercion(ret, wasmToAsmType(curr->type));
}
@@ -2266,8 +2256,7 @@ void Wasm2JSGlue::emitPreES6() {
// yet.
if (baseModuleMap.count(base) && baseModuleMap[base] != module) {
Fatal() << "the name " << base << " cannot be imported from "
- << "two different modules yet\n";
- abort();
+ << "two different modules yet";
}
baseModuleMap[base] = module;