diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-11-15 21:36:33 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-12-07 16:50:04 -1000 |
commit | 98e9e604c7e2e4f928abe8f05691df90cddf09e4 (patch) | |
tree | 9497de28012c109ae0e6e958aca8968e8a3d97cf /src/wasm.h | |
parent | 49bdfd20094e909fb6f4ea989e2a2cbfe01e8741 (diff) | |
download | binaryen-98e9e604c7e2e4f928abe8f05691df90cddf09e4.tar.gz binaryen-98e9e604c7e2e4f928abe8f05691df90cddf09e4.tar.bz2 binaryen-98e9e604c7e2e4f928abe8f05691df90cddf09e4.zip |
add a RemoveUnusedModuleElements pass, and make LegalizeJSInterface create TempRet0 if needed (otherwise we might remove it before we use it)
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/wasm.h b/src/wasm.h index c1ef75ea9..75d6a174c 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1609,10 +1609,26 @@ public: } // TODO: remove* for other elements - void updateFunctionsMap() { + void updateMaps() { functionsMap.clear(); - for (auto& func : functions) { - functionsMap[func->name] = func.get(); + for (auto& curr : functions) { + functionsMap[curr->name] = curr.get(); + } + functionTypesMap.clear(); + for (auto& curr : functionTypes) { + functionTypesMap[curr->name] = curr.get(); + } + importsMap.clear(); + for (auto& curr : imports) { + importsMap[curr->name] = curr.get(); + } + exportsMap.clear(); + for (auto& curr : exports) { + exportsMap[curr->name] = curr.get(); + } + globalsMap.clear(); + for (auto& curr : globals) { + globalsMap[curr->name] = curr.get(); } } }; |