ref.compare.eq
← ref dialect
Return true for two null handles or two handles to the same managed payload, and false otherwise. Both operands must name the same external payload type, but may have different ownership modes. Neither operand is retained, released, or dereferenced. Equality compares object identity, not payload contents.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, SafeToSpeculate |
| Ownership effects |
borrow left (by_value), borrow right (by_value) |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
left |
managed_reference |
required |
— |
| Operand |
right |
managed_reference |
required |
— |
| Result |
result |
i1 |
required |
— |
Examples
%same = ref.compare.eq %owner, %frame : ref<@Frame>, ptr<@Frame>