diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Print.cpp | 4 | ||||
-rw-r--r-- | src/shell-interface.h | 4 | ||||
-rw-r--r-- | src/wasm/literal.cpp | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index fef4ac01d..e35d9b57e 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -447,7 +447,9 @@ struct PrintExpressionContents prepareColor(o); o << "memory.fill"; } - void visitConst(Const* curr) { o << curr->value; } + void visitConst(Const* curr) { + o << curr->value.type << ".const " << curr->value; + } void visitUnary(Unary* curr) { prepareColor(o); switch (curr->op) { diff --git a/src/shell-interface.h b/src/shell-interface.h index 72c7dc67b..71e09189d 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -135,7 +135,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { Literal callImport(Function* import, LiteralList& arguments) override { if (import->module == SPECTEST && import->base == PRINT) { for (auto argument : arguments) { - std::cout << '(' << argument << ')' << '\n'; + std::cout << argument << " : " << argument.type << '\n'; } return Literal(); } else if (import->module == ENV && import->base == EXIT) { @@ -211,7 +211,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { } void trap(const char* why) override { - std::cout << "[trap " << why << "]\n"; + std::cerr << "[trap " << why << "]\n"; throw TrapException(); } }; diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 41d8d2924..3b2930c67 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -252,7 +252,7 @@ void Literal::printVec128(std::ostream& o, const std::array<uint8_t, 16>& v) { } std::ostream& operator<<(std::ostream& o, Literal literal) { - prepareMinorColor(o) << literal.type << ".const "; + prepareMinorColor(o); switch (literal.type) { case Type::none: o << "?"; |