summaryrefslogtreecommitdiff
path: root/src/passes/SignatureRefining.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/SignatureRefining.cpp')
-rw-r--r--src/passes/SignatureRefining.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/passes/SignatureRefining.cpp b/src/passes/SignatureRefining.cpp
index 2c2146c3f..bde1c4fb9 100644
--- a/src/passes/SignatureRefining.cpp
+++ b/src/passes/SignatureRefining.cpp
@@ -243,7 +243,15 @@ struct SignatureRefining : public Pass {
for (auto param : iter->second.params) {
newParamsTypes.push_back(param);
}
- TypeUpdating::updateParamTypes(func, newParamsTypes, wasm);
+ // Do not update local.get/local.tee here, as we will do so in
+ // GlobalTypeRewriter::updateSignatures, below. (Doing an update here
+ // would leave the IR in an inconsistent state of a partial update;
+ // instead, do the full update at the end.)
+ TypeUpdating::updateParamTypes(
+ func,
+ newParamsTypes,
+ wasm,
+ TypeUpdating::LocalUpdatingMode::DoNotUpdate);
}
}
};