From 786e95242caa4343edc6781a5738ebfbe1df1592 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 14 Jan 2016 11:39:22 -0800 Subject: add locations for recursion debugging --- src/wasm-binary.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/wasm-binary.h') 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 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 -- cgit v1.2.3