MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / inverse_cmp_op

Function inverse_cmp_op

crates/parser/src/optimize.rs:744–757  ·  view source on GitHub ↗
(op: CmpOp)

Source from the content-addressed store, hash-verified

742}
743
744fn inverse_cmp_op(op: CmpOp) -> CmpOp {
745 match op {
746 CmpOp::Eq => CmpOp::Ne,
747 CmpOp::Ne => CmpOp::Eq,
748 CmpOp::LtS => CmpOp::GeS,
749 CmpOp::LtU => CmpOp::GeU,
750 CmpOp::GtS => CmpOp::LeS,
751 CmpOp::GtU => CmpOp::LeU,
752 CmpOp::LeS => CmpOp::GtS,
753 CmpOp::LeU => CmpOp::GtU,
754 CmpOp::GeS => CmpOp::LtS,
755 CmpOp::GeU => CmpOp::LtU,
756 }
757}
758
759const PREVIOUS_NON_NOP_BACKTRACK_LIMIT: usize = 32;
760

Callers 1

rewriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected