зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1847239 - wasm: Reset non-nullable local state when using delegate to end try. r=jseward
A try block can end with 'delegate' instead of 'end'. We need to unset the nnl state the same way in both. Differential Revision: https://phabricator.services.mozilla.com/D185439
This commit is contained in:
Родитель
00b18fa30a
Коммит
5c5632a208
|
@ -10,6 +10,7 @@ const KINDS = [
|
|||
"loop",
|
||||
"try",
|
||||
"catch",
|
||||
"delegate",
|
||||
"if",
|
||||
"else",
|
||||
]
|
||||
|
@ -41,6 +42,9 @@ function generateBlock(kind, contents) {
|
|||
case "catch": {
|
||||
return `try\ncatch_all\n${contents}end\n`
|
||||
}
|
||||
case "delegate": {
|
||||
return `try\n${contents}\ndelegate 0\n`
|
||||
}
|
||||
case "if": {
|
||||
return `i32.const 0\nif\n${contents}end\n`
|
||||
}
|
||||
|
|
|
@ -1724,6 +1724,7 @@ inline void OpIter<Policy>::popDelegate() {
|
|||
MOZ_ASSERT(Classify(op_) == OpKind::Delegate);
|
||||
|
||||
controlStack_.popBack();
|
||||
unsetLocals_.resetToBlock(controlStack_.length());
|
||||
}
|
||||
|
||||
template <typename Policy>
|
||||
|
|
Загрузка…
Ссылка в новой задаче