summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-11-15 21:36:33 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-12-07 16:50:04 -1000
commit98e9e604c7e2e4f928abe8f05691df90cddf09e4 (patch)
tree9497de28012c109ae0e6e958aca8968e8a3d97cf /src/wasm.h
parent49bdfd20094e909fb6f4ea989e2a2cbfe01e8741 (diff)
downloadbinaryen-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.h22
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();
}
}
};