pub enum BinOp {
Show 19 variants
Add,
Sub,
Mul,
Div,
Mod,
Pow,
BitAnd,
BitOr,
BitXor,
BitShl,
BitShr,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
}Expand description
Binary operations in MIR.
W11-fup-A (Phase 3d, 2026-05-18) extends this enum with Pow + the five
bitwise variants (BitAnd/BitOr/BitXor/BitShl/BitShr) per the
W11-jit-new-array close §4 Class A residual: the bytecode VM already
emits typed opcodes for these operators (PowInt/PowNumber,
BitAndInt/BitOrInt/BitXorInt/BitShlInt/BitShrInt at
crates/shape-vm/src/bytecode/opcode_defs.rs:317-322 / 1860-1873); the
MIR layer was the gap forcing lower_binary_op to fall through to
Rvalue::Aggregate(vec![l, r]) and surface-and-stop in JIT (Route A
at crates/shape-jit/src/mir_compiler/rvalues.rs:145).
Fuzzy ops + NullCoalesce / ErrorContext / Pipe remain unhandled
here per the same close doc’s “different semantics” disposition — those
are tracked by their own follow-up sub-clusters.
Variants§
Trait Implementations§
impl Copy for BinOp
impl Eq for BinOp
impl StructuralPartialEq for BinOp
Auto Trait Implementations§
impl Freeze for BinOp
impl RefUnwindSafe for BinOp
impl Send for BinOp
impl Sync for BinOp
impl Unpin for BinOp
impl UnsafeUnpin for BinOp
impl UnwindSafe for BinOp
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more