diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-11-25 15:46:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-25 15:46:56 -0800 |
commit | 8a70121a421204e05d020c67294e7e517c2d15d2 (patch) | |
tree | da493f5ee5c8a3dfd18fba7518e05d25b1a71fba /src/passes/RemoveUnusedModuleElements.cpp | |
parent | d90583cf509c3f21b3b5136d3872b097c5f2800c (diff) | |
download | binaryen-8a70121a421204e05d020c67294e7e517c2d15d2.tar.gz binaryen-8a70121a421204e05d020c67294e7e517c2d15d2.tar.bz2 binaryen-8a70121a421204e05d020c67294e7e517c2d15d2.zip |
Remove FunctionType from Event (#2466)
This is the start of a larger refactoring to remove FunctionType entirely and
store types and signatures directly on the entities that use them. This PR
updates BrOnExn and Events to remove their use of FunctionType and makes the
BinaryWriter traverse the module and collect types rather than using the global
FunctionType list. While we are collecting types, we also sort them by frequency
as an optimization. Remaining uses of FunctionType in Function, CallIndirect,
and parsing will be removed in a future PR.
Diffstat (limited to 'src/passes/RemoveUnusedModuleElements.cpp')
-rw-r--r-- | src/passes/RemoveUnusedModuleElements.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp index 806545adf..20ce284f7 100644 --- a/src/passes/RemoveUnusedModuleElements.cpp +++ b/src/passes/RemoveUnusedModuleElements.cpp @@ -301,9 +301,6 @@ struct RemoveUnusedModuleElements : public Pass { for (auto* call : analyzer.indirectCalls) { call->fullType = canonicalize(call->fullType); } - for (auto* event : analyzer.events) { - event->type = canonicalize(event->type); - } // remove no-longer used types module->functionTypes.erase( std::remove_if(module->functionTypes.begin(), |