MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / eq

Method eq

cranelift/codegen/src/data_value.rs:31–61  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

29
30impl PartialEq for DataValue {
31 fn eq(&self, other: &Self) -> bool {
32 use DataValue::*;
33 match (self, other) {
34 (I8(l), I8(r)) => l == r,
35 (I8(_), _) => false,
36 (I16(l), I16(r)) => l == r,
37 (I16(_), _) => false,
38 (I32(l), I32(r)) => l == r,
39 (I32(_), _) => false,
40 (I64(l), I64(r)) => l == r,
41 (I64(_), _) => false,
42 (I128(l), I128(r)) => l == r,
43 (I128(_), _) => false,
44 (F16(l), F16(r)) => l.partial_cmp(&r) == Some(Ordering::Equal),
45 (F16(_), _) => false,
46 (F32(l), F32(r)) => l.as_f32() == r.as_f32(),
47 (F32(_), _) => false,
48 (F64(l), F64(r)) => l.as_f64() == r.as_f64(),
49 (F64(_), _) => false,
50 (F128(l), F128(r)) => l.partial_cmp(&r) == Some(Ordering::Equal),
51 (F128(_), _) => false,
52 (V128(l), V128(r)) => l == r,
53 (V128(_), _) => false,
54 (V64(l), V64(r)) => l == r,
55 (V64(_), _) => false,
56 (V32(l), V32(r)) => l == r,
57 (V32(_), _) => false,
58 (V16(l), V16(r)) => l == r,
59 (V16(_), _) => false,
60 }
61 }
62}
63
64impl DataValue {

Callers

nothing calls this directly

Calls 3

as_f32Method · 0.80
as_f64Method · 0.80
partial_cmpMethod · 0.45

Tested by

no test coverage detected