summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-14 11:39:22 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-14 11:39:22 -0800
commit786e95242caa4343edc6781a5738ebfbe1df1592 (patch)
tree72e7b437c2ffcbd6fc8f1a691c7ea6b763589026 /src/wasm-binary.h
parent76db2f00068f732c6bee8346085c794d26061fc0 (diff)
downloadbinaryen-786e95242caa4343edc6781a5738ebfbe1df1592.tar.gz
binaryen-786e95242caa4343edc6781a5738ebfbe1df1592.tar.bz2
binaryen-786e95242caa4343edc6781a5738ebfbe1df1592.zip
add locations for recursion debugging
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index ed4d5a959..9890453a6 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -555,9 +555,9 @@ public:
int depth;
void recurse(Expression*& curr) {
- if (debug) std::cerr << "zz recurse into " << ++depth << std::endl;
+ if (debug) std::cerr << "zz recurse into " << ++depth << " at " << o.size() << std::endl;
visit(curr);
- if (debug) std::cerr << "zz recurse from " << depth-- << std::endl;
+ if (debug) std::cerr << "zz recurse from " << depth-- << " at " << o.size() << std::endl;
}
std::vector<Name> breakStack;
@@ -1156,7 +1156,7 @@ public:
int depth;
void readExpression(Expression*& curr) {
- if (debug) std::cerr << "zz recurse into " << ++depth << std::endl;
+ if (debug) std::cerr << "zz recurse into " << ++depth << " at " << pos << std::endl;
uint8_t code = getInt8();
if (debug) std::cerr << "readExpression seeing " << (int)code << std::endl;
switch (code) {
@@ -1197,7 +1197,7 @@ public:
abort();
}
}
- if (debug) std::cerr << "zz recurse from " << depth-- << std::endl;
+ if (debug) std::cerr << "zz recurse from " << depth-- << " at " << pos << std::endl;
}
template<typename T>