diff options
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 45137fffe..0f1017e00 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -821,6 +821,7 @@ void Try::finalize() { // If none of the component bodies' type is a supertype of the others, assume // the current type is already correct. TODO: Calculate a proper LUB. std::unordered_set<Type> types{body->type}; + types.reserve(catchBodies.size()); for (auto catchBody : catchBodies) { types.insert(catchBody->type); } @@ -844,6 +845,7 @@ void Rethrow::finalize() { type = Type::unreachable; } void TupleMake::finalize() { std::vector<Type> types; + types.reserve(operands.size()); for (auto* op : operands) { if (op->type == Type::unreachable) { type = Type::unreachable; |