avanhatt / wasmtime

Standalone JIT-style runtime for WebAssembly, using Cranelift
https://wasmtime.dev/
Apache License 2.0
0 stars 1 forks source link

veri: replace TestResult::MultiType with callback #86

Closed mmcloughlin closed 10 months ago

mmcloughlin commented 11 months ago

This PR replaces the TestResult::MultiType variant with a callback that computes the expected VerificationResult for a provided TermSignature.

The MultiType variant was only used in a single test, where it was used to provide a list of expectations derived from isle_inst_types().

https://github.com/avanhatt/wasmtime/blob/575c137da4f90601f6542775ed40420d6524f5d0/cranelift/isle/veri/veri_engine/tests/veri.rs#L1102-L1126

The motivation for this change is that this approach will no longer work if we provide ISLE term signatures in the source code instead, as implemented in #82. The term signatures will only be known later, at which point we can use the TestResult::Expect callback to derive the expectation.