blob: b49eeef4b1b8da30954abe3c4108d7e0ee0b6f67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "wasm-interpreter.h"
namespace wasm {
#ifdef WASM_INTERPRETER_DEBUG
int Indenter::indentLevel = 0;
Indenter::Indenter(const char* entry) : entryName(entry) { ++indentLevel; }
Indenter::~Indenter() {
print();
std::cout << "exit " << entryName << '\n';
--indentLevel;
}
void Indenter::print() {
std::cout << indentLevel << ':';
for (int i = 0; i <= indentLevel; ++i) {
std::cout << ' ';
}
}
#endif // WASM_INTERPRETER_DEBUG
std::ostream& operator<<(std::ostream& o, const WasmException& exn) {
return o << exn.tag << " " << exn.values;
}
} // namespace wasm
|