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

Method join

cranelift/codegen/src/remove_constant_phis.rs:83–100  ·  view source on GitHub ↗
(self, other: AbstractValue)

Source from the content-addressed store, hash-verified

81
82impl AbstractValue {
83 fn join(self, other: AbstractValue) -> AbstractValue {
84 match (self, other) {
85 // Joining with `None` has no effect
86 (AbstractValue::None, p2) => p2,
87 (p1, AbstractValue::None) => p1,
88 // Joining with `Many` produces `Many`
89 (AbstractValue::Many, _p2) => AbstractValue::Many,
90 (_p1, AbstractValue::Many) => AbstractValue::Many,
91 // The only interesting case
92 (AbstractValue::One(v1), AbstractValue::One(v2)) => {
93 if v1 == v2 {
94 AbstractValue::One(v1)
95 } else {
96 AbstractValue::Many
97 }
98 }
99 }
100 }
101
102 fn is_one(self) -> bool {
103 matches!(self, AbstractValue::One(_))

Callers 15

mainFunction · 0.45
do_remove_constant_phisFunction · 0.45
write_debug_tagsFunction · 0.45
pretty_print_destsMethod · 0.45
mem_finalize_for_showFunction · 0.45
print_with_stateMethod · 0.45
mem_finalize_for_showFunction · 0.45
gen_common_isleFunction · 0.45
shared_isle_lower_pathsFunction · 0.45
get_isle_compilationsFunction · 0.45
gen_templateFunction · 0.45
generate_macro_inst_fnFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected