From 9fb040740ec3ca1c298ecd95f21c071ab1ab170e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 4 Apr 2016 14:34:02 -0700 Subject: add apis for accessing module elements --- src/wasm-binary.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index edc904787..5695cffcc 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1709,8 +1709,7 @@ public: void visitCallImport(CallImport *curr) { if (debug) std::cerr << "zz node: CallImport" << std::endl; curr->target = wasm.imports[getU32LEB()]->name; - assert(wasm.importsMap.find(curr->target) != wasm.importsMap.end()); - auto type = wasm.importsMap[curr->target]->type; + auto type = wasm.getImport(curr->target)->type; assert(type); auto num = type->params.size(); if (debug) std::cerr << "zz node: CallImport " << curr->target << " with type " << type->name << " and " << num << " params\n"; -- cgit v1.2.3