From 47b29f9ab6caff2070860a60e656ec99239f7521 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 26 Aug 2022 09:44:48 -0700 Subject: [NFC] Simplify binary reading logic for functions (#4969) We do a call to updateMaps() at the end of processNames anyhow, and so we may as well call addFunction immediately (and the names will get fixed up in that updateMaps later). The old code for some reason did that for function imports, but not normal functions. It also stored them separately in temporary storage for some unclear reason... --- src/wasm-binary.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index e787baa9d..f6924aa14 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1511,11 +1511,6 @@ public: // We read functions and globals before we know their names, so we need to // backpatch the names later - // we store functions here before wasm.addFunction after we know their names - std::vector functions; - // we store function imports here before wasm.addFunctionImport after we know - // their names - std::vector functionImports; // at index i we have all refs to the function i std::map> functionRefs; Function* currFunction = nullptr; -- cgit v1.2.3