Bug 1823379 - wasm: Test case. r=jseward

Depends on D174766

Differential Revision: https://phabricator.services.mozilla.com/D174767
This commit is contained in:
Ryan Hunt 2023-08-08 15:23:23 +00:00
Родитель cb8a1497b6
Коммит fd36e4db4c
1 изменённых файлов: 33 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,33 @@
// |jit-test| test-also=--wasm-function-references --wasm-gc --wasm-compiler=optimizing; test-also=--wasm-function-references --wasm-gc --wasm-compiler=baseline;
wasmFailValidateText(`(module
(tag)
(tag)
(func (export "test")
try
throw 0
catch 0
unreachable
catch 1
i32.add
end
)
)`, /popping/);
if (wasmGcEnabled()) {
wasmFailValidateText(`(module
(tag)
(tag)
(func (export "test") (param (ref extern))
(local $nonNullable (ref extern))
try
throw 0
catch 0
(local.set $nonNullable (local.get 0))
catch 1
(local.get $nonNullable)
drop
end
)
)`, /unset local/);
}