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

Method new

src/output.rs:107–113  ·  view source on GitHub ↗
(kind: AllocationKind)

Source from the content-addressed store, hash-verified

105 #[inline]
106 #[must_use]
107 pub fn new(kind: AllocationKind) -> Self {
108 let bits = match kind {
109 AllocationKind::SpillSlot(spillslot) => spillslot.index() as u32,
110 AllocationKind::PhysReg(reg) => (1 << 31) | reg.index() as u32,
111 };
112 Self { bits }
113 }
114
115 /// Creates an allocation into a `PhysReg`.
116 #[inline]

Callers

nothing calls this directly

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected