From 891de7b9f3c173095b0e09d0f9069c14c6bd2bc4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 29 Oct 2015 17:50:13 -0700 Subject: print call_import properly --- src/wasm.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/wasm.h') diff --git a/src/wasm.h b/src/wasm.h index a5210e4d6..40d9a126e 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -364,8 +364,7 @@ public: Name target; ExpressionList operands; - std::ostream& print(std::ostream &o, unsigned indent) override { - printOpening(o, "call "); + std::ostream& printBody(std::ostream &o, unsigned indent) { target.print(o); if (operands.size() > 0) { incIndent(o, indent); @@ -378,9 +377,18 @@ public: } return o; } + + std::ostream& print(std::ostream &o, unsigned indent) override { + printOpening(o, "call "); + return printBody(o, indent); + } }; class CallImport : public Call { + std::ostream& print(std::ostream &o, unsigned indent) override { + printOpening(o, "call_import "); + return printBody(o, indent); + } }; class FunctionType { -- cgit v1.2.3