MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / nanpattern2tinywasmvalue

Function nanpattern2tinywasmvalue

crates/cli/src/wast_runner.rs:858–868  ·  view source on GitHub ↗
(arg: wast::core::NanPattern<T>)

Source from the content-addressed store, hash-verified

856}
857
858fn nanpattern2tinywasmvalue<T>(arg: wast::core::NanPattern<T>) -> Result<WasmValue>
859where
860 T: FloatToken,
861{
862 use wast::core::NanPattern::{ArithmeticNan, CanonicalNan, Value};
863 Ok(match arg {
864 CanonicalNan => T::canonical_nan(),
865 ArithmeticNan => T::arithmetic_nan(),
866 Value(v) => v.value(),
867 })
868}
869
870#[cfg(test)]
871mod tests {

Callers 2

wast_v128_to_bytesFunction · 0.85

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected