MCPcopy Create free account
hub / github.com/Amanieu/regalloc3 / kind

Method kind

src/allocation_unit.rs:75–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

73 #[inline]
74 #[must_use]
75 pub fn kind(self) -> AllocationUnitKind {
76 if self.index() < MAX_REG_UNITS {
77 AllocationUnitKind::Reg(RegUnit::new(self.index()))
78 } else {
79 AllocationUnitKind::SpillSlot(SpillSlot::new(self.index() - MAX_REG_UNITS))
80 }
81 }
82}
83
84/// Expanded form of `AllocationUnit` as an enum.

Callers 2

fmtMethod · 0.45
unitsMethod · 0.45

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected